| Command | For | Command | For |
|---|---|---|---|
| Chkdsk | Checking a Drive's status | FDisk | Configuring/Partitioning Hard Disks |
| Move | Moving Files/Renaming Directories | Sys | Copying System Files |
| RD | Removing (Deleting) Directories | XCopy | Copying Files in a DOS Box (and |
| Type | Displaying Text File Contents | Explanation of copying in DOS Mode/DOS Box) | |
| Using DOS Commands Essential Commands Main Topic Index | |||
| CHKDSK - Checks a Drive's status. |
|---|
Usage:chkdsk drive switchSwitches:
|
| FDISK - Configures a hard drive. |
Usage:FDISKSwitches:
The Win95 version of FDISK will wipe the data on all partitions. For this reason, use of PowerQuest's 'Partition Magic' or a similar Third-Party program is preferable, as it can create and resize partitions without affecting the data, as well as setting the FAT. Win98 has a somewhat better utility. |
| Top of Page Main Topic Index |
| RD - Removes (deletes) a Directory. |
|---|
Usage:RD path+nameExample: RD D:\DATA\DOWNLOAD deletes the directory. |
| MOVE - Moves Files and Renames Directories. |
Usage:MOVE path+name path+nameSwitches:
MOVE /-Y C:\WINDOWS\SYSTEM.BAK SYSTEM.BA1 D:\DATA\BACKUPS\SYSTEM.1 Moves SYSTEM.BAK to another directory and renames it, asking if SYSTEM.1 is to be a File or Directory.MOVE D:\DATA\DOWNLOAD\MISC D:\MISC renames D:\DATA\DOWNLOAD as a new directory D:\MISC. |
| Top of Page Main Topic Index |
| TYPE - Types (displays) the contents of a file (if this is possible). |
|---|
Usage:TYPE filenameSwitches:
TYPE c:\config.sys >PRN Causes the file to be printed.TYPE c:\games\tennis\readme.txt |MORE Causes the file to be displayed, a page at a time.Note: The |MORE 'switch' has to be used here in place of the /P switch used with DIR and must have the | 'pipe' character instead of the / backslash. An alternative using MORE as a command in itself (which can only be done with with a *.txt text file) would be:MORE c:\games\tennis\readme.txt
|
| SYS - Copies System files. |
Usage:sys drive driveExamples: sys c: a: copies the files to a floppy.sys a: c: copies the files from a floppy.If copying to a floppy, only use one which has already been Formatted - or use the /S switch with FORMAT to do it. This is a quick way to get a newly formatted hard drive to be able to boot itself, by copying the basic files from a boot floppy. The files copied are: Command.com, IO.sys, MSDOS.sys and Drvspace.bin. Or you can create a 'Bootable Floppy', which you can then customise by adding files etc. By itself it is more of use in dire emergencies than anything else - certainly not for restoring Windows. (See Re-Installing Win9x for more on creating boot disks). |
| Top of Page Main Topic Index |
| XCOPY - Copying Files in a DOS Box. | ||||
|---|---|---|---|---|
XCOPY runs as the 32-bit XCOPY32 which supports Long File Namesor at least copies them correctly. See below for more about this. Usage: xcopy switches path+name(s) path+name(s) orxcopy switches source destinationSwitches:
XCOPY /H C:\WINDOWS\SYSTEM.DAT C:\BACKUPS\SYSTEM.BAK
copies C:\WINDOWS\SYSTEM.DAT and saves it as C:\BACKUPS\SYSTEM.BAKXCOPY /C /E /H /I /K /Q C:\WINDOWS\*.* D:\WINDOWS\*.* copies the entire C:\WINDOWS\ directory & sub-directories to drive D: , not stopping at errors (though they will be notified), including Hidden & System files and empty directories, retaining Attributes, without listing files during copying.XCOPY C:\WINDOWS\FONTS\*.TTF E:\FONTS\*.TTF
copies all the True-Type fonts to a folder called E:\FONTS It is quicker to copy the lot and delete the obvious ones wholesale than choose them one-by-one if you have a lot of non-standard fonts.On my machine the second example can copy almost 2,000 files across in under 2 minutes with 3 other applications open. The only 'error' is usually the Windows Swap file, due to it being in use (I wouldn't want it anyhow!). This is simply a test example. Backing up Data files with a similar command would be faster unless they were massive images and databases. All you need do is work out the appropriate command for your setup (note the /U switch), save it in a Batch file (for an example see Creating Batch Files) and run it from a DOS Box. Or create a shortcut to the file from your Start Menu - clicking on it will open the DOS Box and start it running.The third example is a simple one for simply backing up fonts, usually prior to re-installing Windows (see Preparation. I have included it because Explorer will not copy installed Font files anywhere! There is no point copying the 'system' fonts (files ending in '.fon', which show up with red icons in Explorer) as they will be re-installed automatically. |
||||
|
~ An Explanation: XCOPY and XCOPY32 in DOS Mode as against a DOS Box ~ ~ Please pay attention if you want to fathom this out. I'm not taking the blame if you use the wrong one. OK? ~ |
||||
|
||||
| Top of Page Main Topic Index | ||||
< Home >