PC / MS-DOS:



A partial list of PC / MS-DOS commands:



INTERNAL COMMANDS:



List files on current drive:
dir

List files widthwise:
dir/w

List one page at a time:
dir/p

List the contents of the parent directory:
dir ..

Send the directory listing for the current directory to a file called "directory.txt":
dir >directory.txt

Clear the screen:
cls

Delete "file.ext":
del file.ext

Delete all files in a directory (dangerous!):
del *.*

Copy a file named "tron.exe" to floppy drive b: :
copy tron.exe b:

Go to the mogwai\spike directory (directory = folder):
cd mogwai\spike

Return to root directory:
cd\

Go up one directory:
cd..

Make a directory (folder) called "MICRONAUT":
md micronaut

Delete the directory called "XEVIOUS": (this only works for empty directories).
rd xevious

Delete the full directory "XEVIOUS", and all of its sub-directories: (DOS 5+)
deltree xevious

----------------------------------------------------



EXTERNAL COMMANDS (these are executable files):



Undelete a file called "Bubble.bas": (DOS 5)
undelete bubble.bas


XCOPY - A more powerful copy command:

Copy all files from the subsubdirectory called "FOOD" to the disk in A:, including all (S)ubdirectories, all (E)mpty subdirectories, (M)ark all files as copied, so that the user can put a new blank disk into the drive when the first one fills up, and continue where s/he left off. Re-issue the command by pressing F3 and ENTER:
xcopy c:\houses\tables\food. a:/s/e/m

Note: The '/m' switch is only for spanning across things like floppy disks. Do not use the '/m' switch if you're xcopying to a drive that is big enough to hold all of the files. Why? Because if you decide that you don't like the location that the files were copied to, delete the copies, and re-issue the xcopy command to a different location or directory, xcopy will only copy the folders, and will NOT copy the files again. The reason for this is that the files were already copied once, and have been marked as copied. Xcopy will not copy them again, unless you leave the '/m' option off. In such a case, you'd be best to use
xcopy c:\houses\tables\food. d:/s/e
or
xcopy c:\houses\tables\food *.* d:/s/e

If you're already in the directory that you want to copy files from, just issue the command, beginning with the period (wildcard shorthand). Let's say you were already in the "COINOP\JOUST" directory, and you wanted to copy all of the files in this directory to the disk in drive A:. You'd type:
xcopy . a:



See how much room there is on the current drive:
chkdsk

Check what version of DOS you're using:
ver

-----------------------

Format the disk in A:
format a:

Format the disk in A: as a high density disk, transferring (S)ystem files to it, (U)nconditionally formatting the disk, and allowing you to give the disk a (V)olume name.
format a:/s/u/v

------------

Format a low-density 3.5" disk in high-density drive A: (720K):
format a:/n:720
or
format a:/n:9/t:80

Format a high-density 3.5" disk in high-density drive A: (1.44MB):
format a:

Format a low-density 3.5" disk in low-density drive A: (720K):
format a:

Format a low density 5.25" disk in high-density drive A: (360K):
format a:/n:360

Format a high-density 5.25" disk in high-density drive A: (1.2MB):
format a:

-----------------

Lock a file and make it undeleteable:
attrib +r file.ext

Unlock a file:
attrib -r file.ext

Note: Some files (like the registry files) will need to be made usable by issuing ALL FOUR arguments. I.e.
attrib -r -a -s -h file.ext

Uncompress a file that has been compressed with Microsoft Compress:
expand ansi.sy_ c:\dos\ansi.sys
This expands the file "ansi.sy_" into one called "ansi.sys". You need to know (or at least guess) the last letter of the file's extension, in order to use this command.

Load the DOS 5+ text editor:
edit


-----------------
-----------------

Solving memory problems in DOS:


Step 1:

- Format a blank diskette, using the FORMAT A:/S command.
- Copy the following files to the diskette:
Config.sys and Autoexec.bat

e.g.) COPY CONFIG.SYS A:

- Write-protect the disk and store it in a safe place.


Step 2:

- Load the Config.sys file (the one on the hard drive) into a text editor or word processor.

- Look for lines in the Config file that are similar to the lines below. Modify the lines to match the following:

device=c:\dos\himem.sys
dos=high,umb
device=c:\dos\emm386.exe 512 ram
files=10
shell=c:\dos\command.com c:\dos\ /p
stacks=0,0

-----------------------------











[Blitter.Com]