CHKDSK CLS COPY MS DOS COMMAND check the status of a disk fix some disk errors display a status report showing any errors found in the file allocation table (FAT) and directory structure summary of disk usage detect and fix a much wider range of disk problems

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

CHKDSK

CHKDSK is used to check the status of a disk, fix some disk errors, and display a status report showing any errors found in the file allocation table (FAT) and directory structure. CHKDSK also displays a summary of disk usage. If errors are found on the disk, CHKDSK displays a warning message.

Syntax:

CHKDSK [path] [/F] [/V]

Path Specifies the drive and directory to check.

/F Fixes errors on the disk.
/V Displays the full path and name of every file on the disk

SCANDISK can reliably detect and fix a much wider range of disk problems and is generally preferred to the somewhat dated CHKDSK. The /F switch (for fixing any errors found) should not be used while any program is running other than DOS and CHKDSK itself.

CHKDSK cannot be used on drives created using SUBST, nor can it be used on network drives. In win98, CHKDSK does not check the disk, though still provides some basic data

You should not scan the disk with CHKDSK or SCANDISK or any other disk scanning program if your disk is crashed or there is any logical error in your boot sectors like MBR, DBR, FAT or root directories are corrupted. It may make you data information distorted and can make it difficult to recover. Not only this you may not recover data completely.

CLS

Clears the screen leaving only the command prompt and cursor.

Syntax:
CLS

COMMAND

Starts a new copy of the Command Interpreter.
Syntax:

COMMAND [path] [device] [/Switches]

Path Drive and directory containing command.com. This must be specified unless command.com is in the root directory.

Device Device to use for command input and output. By default this is the keyboard and monitor

/P Makes the new Command Interpreter permanent.

/E:x Sets the initial environment size [bytes]. x should be set between 256 and 32,768 bytes. The default is: 256 bytes.

/L:y Internal buffers length [bytes]. y should be set between 128 and 1,024 bytes. This switch is only accepted if the Command Interpreter is permanent. The /P switch must also be set.

/U:z Input buffer length [bytes]. z should be set between 128 and 255 bytes. The default is: ? This switch is only accepted if the Command Interpreter is permanent. the /P switch must also be set.

/MSG Stores all error messages in memory. This switch is only accepted if the Command Interpreter is permanent. The /P switch must also be set.

/LOW Forces COMMAND to keep in low memory

/Y Steps through the batch program specified by /C or /K

/C command Executes command and exits. This must be the last switch on the command line.

/K command Executes command and continues running. This must be the last switch on the command line.

COPY

The prime use of COPY is to copy one or more files to another location but it can also be used to combine (append and concatenate) files and to type directly to a file, printer, or other device.

Syntax:

COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]]
[destination [/A | /B]] [/V] [/Y | /-Y]

source The file(s) to be copied. Although this must be a single parameter, it may include multiple files specified using wildcards (* or ?). It may also be a valid device (e.g. CON)

like COPY CON NOTES.TXT

now write or copy the text and come out by entering the key Ctrl+Z.

destination The directory and/or filename for the new file(s). If destination is not specified source is copied to the current directory with the same name and creation date as the original. If source is in the current directory, an error message is displayed stating that the "file cannot be copied to itself”.

file /A Forces COPY to treat the file as an ASCII text file.

file /B Forces COPY to treat the file as a binary file.

/V Verifies that new files can be read.

/Y No warning prompt before overwriting a file.

/-Y Displays a warning and requires confirmation before overwriting a file.

When used from the command line, if a file specified in destination already exists in the specified location, COPY will, by default, display a warning message and require confirmation before overwriting the old file. On the other hand, when COPY is used in a batch file, any existing files will be overwritten without warning.

This default behavior can be modified by presetting the /Y | /-Y switch in the COPYCMD environment variable and overruled by using the /Y | /-Y switch on the command line.

COPY does not copy files that are 0 bytes long; instead, it deletes such files. Use XCOPY to copy these files. Source and/or Destination may be an appropriate device (such as CON, COMx or LPTx where x is 1,2,3 exc.) rather than a file.

Depending on context, Copy treats files as binaries or ASCII text files. By default:

  • When copying files from one location to another (ASCII or not), COPY assumes binary mode,
  • When concatenating files, COPY assumes ASCII mode,
  • When source or destination is a device (other than a disk), copy assumes ASCII mode.

When operating in binary mode, COPY determines the file's starting location from the File Allocation Table and copies the number of bytes allocated to that file from that point.

When in ASCII mode, data is copied until an End-Of-File (ASCII character no. 26; Ctrl-Z) character is reached. This character is NOT copied, but COPY adds an EOF character before closing the new file.

This convoluted procedure enables COPY to concatenate files and to work with non-file input (like keyboard). On the few occasions that the default mode is inappropriate, it may be over-ridden by adding the /A or /B switch to source and/or destination files as required.

To copy "note.txt" in the current drive and directory to the directory "mynotes":

COPY note.txt c:\mynotes
or
COPY note.txt c:\mynotes\

In the first case, if the "mynotes" directory doesn't exist, "note.txt" is copied to a file named "mynotes" in the root directory of drive C. In the second case, an "Invalid Directory" error message will be displayed. To copy all the files in the "mynotes" directory to a directory named "mynotes backup" on drive D:

COPY c:\mynotes\*.* d:\mynotes backup\

To make a copy of "note.txt" in the current drive and directory and call it "program note.txt"

COPY note.txt "program note.txt"

Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15

Next page
 
 
Data Recovery Book
 
Chapter 1 An Overview of Data Recovery
Chapter 2 Introduction of Hard Disks
Chapter 3 Logical Approach to Disks and OS
Chapter 4 Number Systems
Chapter 5 Introduction of C Programming
Chapter 6 Introduction to Computer Basics
Chapter 7 Necessary DOS Commands
Chapter 8 Disk-BIOS Functions and Interrupts Handling With C
Chapter 9 Handling Large Hard Disks
Chapter 10 Data Recovery From Corrupted Floppy
Chapter 11 Making Backups
Chapter 12 Reading and Modifying MBR with Programming
Chapter 13 Reading and Modifying DBR with Programming
Chapter 14 Programming for “Raw File” Recovery
Chapter 15 Programming for Data Wipers
Chapter 16 Developing more Utilities for Disks
Appendix Glossary of Data Recovery Terms
 
 
Pro Data Doctor

Home

Products

Contact Details

Customer Support

Download Demo

Terms and Conditions

 
Pro Data Doctor