Site hosted by Angelfire.com: Build your free website today!

 

MS-DOS comands (some secret)

 

 

 

c:\>cd\windows
goes to c:\windows> directory
c:\windows>cd\
goes back to c:\> directory
c:\>cls
clears MS-DOS screen
c:\>copy qbasic.exe a:
copies qbasic.exe from drive c: to a:
c:\>date
displays system date, and lets you change it
c:\>defrag c:
reorganizes the files on drive c: to optimize performance
c:\>del *.exe
deletes all .exe files from drive c:
c:\>del h4cker.txt
deletes the file h4cker.txt from drive c:
c:\>dir
lists files under selected directory
c:\>dir *.exe
finds all files in directory that are .exe
works with any extension (ex: *.sys, *.bmp, *.gif)
c:\>dir /p
pauses the directory list page by page
c:\>dir /w
c:\>diskcopy a: a:
copies files from one disk to another
c:\>echo
display if echo is on or off

echo off
turns echo off
echo on
turns echo on
echo.
creates a blank line
c:\>edit
opens MS-DOS editor

FORMAT /AUTOTEST

This parameter makes FORMAT.COM check for the existing format of your disk, unless the /U (UNCONDITIONAL) parameter is also used [MS-DOS 5.00 - 6.xx ONLY], and then proceeds with an UNATTENDED DISK(ETTE) FORMAT:

DOES NOT prompt for a volume label!
DOES NOT prompt to format another disk(ette)!
There is NO delay: NO user intervention!
Ends WITHOUT pausing!
After completion, it DOES display disk space statistics.
WARNING: This procedure works on hard drives as well as floppy drives!

FORMAT drive: /U

This FORMAT.COM parameter performs an UNCONDITIONAL format, which DESTROYS every byte of data on ANY hard disk/floppy by overwriting it with hex F6h.
WARNING: You canNOT UNFORMAT a disk(ette) formatted using the /U option

FORMAT drive: /SELECT /U

This particular combination of FORMAT.COM parameters makes a disk(ette) UNREADABLE!
WARNING: DO NOT use these two FORMAT switches TOGETHER on ANY drive!

c:\>format a:
erases and formats floppy disks
c:\>format a:/s
creates a system boot disk
C:\>ipconfig
Displays IP Configuration
C:\>ipconfig/all
Displays more detailed information on IP Configuration
c:\>label a:
creates, changes, or deletes the volume label for a disk
c:\>md c:hacks
also makes a directory called hacks on drive c:
c:\>mem
diplays the amount of memory used and amount of free memory
c:\>mkdir c:hacks
makes a directory called hacks on drive c:
c:\>net config
Displays your current workgroup settings
c:\>ping 123.123.12.12
pings ip address
prompt $p$g
changes prompt to current drive> ex. "c:\>"
prompt $d$g
changes promt to date> ex. "Mon 01-24-2001>"
prompt $t$g
changes the prompt to time> ex. "18:24:01.35>"
rem
makes a remark statement to be ignored by dos "helps identify files and scripts"
a:\>ren a:hacks.txt hacking.txt
renames the file hacks.txt to hacking.txt
a:\>rename a:hacks.txt hacking.txt
renames the file hacks.txt to hacking.txt
c:\>rd c:hacks
removes the directory c:hacks
c:\>rmdir c:hacks
removes the directory c:hacks
c:\>scandisk c:
scans drive c: for errors
c:\>telnet
opens telnet
c:\>time
displays system time, and lets you change it
c:\>tracert 123.123.12.12
traces route of internet addresses
c:\>ver
displays operating system version
a:\>vol
displays volume label for disk



COMMAND /D

used on the CONFIG.SYS SHELL= line (the primary shell), or at the MS-DOS prompt (secondary shell in combination with the COMMAND /P parameter), prevents the execution of the AUTOEXEC.BAT file at bootup! Example:
SHELL=C:\COMMAND.COM C:\ /E:512 /D /P

 


COMMAND /F

COMMAND.COM /F removes the "Abort, Retry, Fail" message and forces a "Fail" response to all "Abort, Retry, Fail" prompts issued by the DOS critical error handler. If the floppy disk is not ready it automatically goes to Fail.
This switch can be used on the CONFIG.SYS file SHELL= line. Example:
SHELL=C:\COMMAND.COM C:\ /E:512 /F /P
COMMAND /F can also be used on a Windows PIF file (MS-DOS Prompt Application) command line, or/and at the plain MS-DOS prompt

 

COMMAND /Z

COMMAND.COM /Z displays the "ERRORLEVEL" return code messages after executing each external DOS command (internal DOS commands don't display error codes).
This switch can be used on the CONFIG.SYS file SHELL= line. Example:
SHELL=C:\COMMAND.COM C:\ /E:512 /P /Z
COMMAND /Z can also be used on a Windows PIF file (MS-DOS Prompt Application) command line, or/and at the plain MS-DOS prompt.
You'll see a message like this one when using the "/Z" parameter (errorlevel 0 is the normal/default return code):