*************************************** HOW TO MAKE A TIMEBOMB***************************************
MAKING A TIMER IS EASIER THAN MANY PEOPLE MAY THINK. THE ONLY THINGS YOU WILLNEED ARE:
1. A CLOCK WITH HANDS 2. WIRE 3. A BATTERY 4. SOME FILAMENT WIRE
PHIRST, IF THE CLOCK HAS A PLASTIC COVER OVER THE PHACE, BREAK IT OFF. WHATYOU DO NOW IS TAKE TWO LONG WIRES AND ATTACH ONE TO THE MINUTE HAND OR HOUR HAND(NOT BOTH) AND THE OTHER PERPENDICULAR TO THE PHACE. THE PURPOSE HERE IS TOSHORT OUT THE WIRES AS THE HANDS SWING AROUND TO THE DESIRED TIME.
ONCE YOU HAVE THIS DONE, SOLDER ONE WIRE TO THE POSITIVE (+) END OF THRBATTERY, FILAMENT WIRE TO THE NEGATIVE (-) END OF THE BATT. AND THE OTHER WIRETO THE OTHER END OF THE FILAMENT WIRE.
NOW, WHEN THE DESIRED TIME COMES UP, THE WIRES WILL SHORT OUT, HEATING THEFILAMENT WIRE AND BURNING WHATEVER FUSE YOU MAY HAVE ON IT LEADING TO THEEXPLOSION OF YOUR PHAVORITE BOMB.
NOTE: IF YOU CAN'T FIND FILAMENT WIRE, YOU CAN USE SOMETHING ELSE, LIKE STEELWOOL. REMEMBER IN SURVIVAL TRAINING WHEN THEY SHOWED YOU HOW TO BURN STEEL WOOLWITH JUST A PHEW BATTERIES? SAME PRINCIPLE.
Great Reads
Tuesday, June 24, 2008
MS-DOS Internal Commands Sumarry
# @ (AT SIGN)# ATTRIB.EXE# AUTOEXEC.BAT# BATCH# BOOT# BREAK# CALL# CD# CHCP# CHDIR# CHKDSK.EXE# CHOICE.COM# CLS# CMDLINE# COMMAND# COMSPEC# COPY# CTTY# DATE# DEBUG.EXE# DEL# DELTREE.EXE# DIR# DISKCOPY.COM# DO# DOSKEY.COM# ECHO# EDIT.COM# ERASE# ERRORLEVEL# EXIST# EXIT# EXTENSION# EXTRACT.EXE# FC.EXE# FDISK.EXE# FIND.EXE# FOR# FORMAT.COM# GOTO# IEXTRACT.EXE# IF# IN# KEYB.COM# LABEL.EXE# LABEL# LFNFOR# LH# LOADHIGH# LOCK# MD# MEM.EXE# MKDIR# MODE.COM# MORE.COM# MOVE.EXE# MSCDEX.EXE# MSD.EXE# NAME# NLSFUNC.EXE# NOT# NUL# PATH# PAUSE# PROMPT# RD# REN# RENAME# REDIRECTION# REM# RMDIR# SCANDISK.EXE# SCANREG.EXE# SET# SHIFT# SORT.EXE# START.EXE# SUBST.EXE# SULFNBK.EXE# SYS.COM# TIME# TRUE# TYPE# UNLOCK# VER# VERIFY# VOL# XCOPY.EXE
@ (AT SIGN)
@ disables command echo. One common use is in .BAT files to supress the command display during execution. See ECHO
Example: @ECHO OFF
AUTOEXEC.BAT
AUTOEXEC.BAT is a batch file that will execute whenever the system boots. All DOS commands available for .BAT files are acceptable. See 14132028 and 16015262
Note: AUTOEXEC.BAT must be put in the root directory of the bootable drive.
BATCH
BATCH is not a DOS command.
Batch files, with the .BAT extension, are text files containing DOS commands. They are executed similarly to programs: from the DOS command line; Windows Start/Run; or through a Windows shortcut. See (@), AutoExec, Call, ClearScr, ECHO, Exit, For, GoTo, IF, Label, NUL, Pause, Remark, Shift, and 16015262
BOOT
BOOT is not a DOS command. Boot is a computer operation getting its name from the saying "To pull yourself up by the bootstraps." To boot, a computer executes just enough ROM code to read a disk. This disk contains sufficient code to perform all the work necessary for the system to start.
Early Windows machines first boot DOS, then load Windows code. Windows NT and Windows 2000 boot directly without first loading DOS.
See 15654080
BREAK
BREAK ON tells DOS to check for the user pressing the BREAK key periodically, even if the program is busy. BREAK OFF will tell DOS to only check for user keypresses when the program expects user input.
Type BREAK without parameters to determine current BREAK setting.
Example: BREAK OFF
CALL
The CALL command is used in a .BAT file to execute another .BAT file. When the CALLed .BAT file terminates, the CALLing .BAT file resumes execution. When secondary .BAT file is executed from within a .BAT file, the termination of the secondary .BAT file also terminates the execution of the original .BAT file too.
The CALL command can take parameters to be passed to the called file.
Example: CALL ANOTHER.BAT
CD
CD, or Change Directory, sets the default directory. CD .. (double periods) will change to the parent directory.
CD is identical to CHDIR.
Example: CD \WINDOWS\COMMAND
CHCP
CHCP, or Change Code Page will activate a new code page. CHCP without parameters will display the current code page.
CHDIR
CHDIR, or Change Directory, sets the default directory. CHDIR .. (double periods) will change to the parent directory.
CHDIR is identical to CD.
Example: CHDIR ..
CLS
CLS, or Clear Screen will blank the screen and put the cursor in the upper left corner following the command prompt. Although CLS is commonly used in .BAT files, the CLS command will work if typed from the keyboard.
CMDLINE
CMDLINE is an environment variable value made available to programs. Although it isn't a DOS command, it is included here because COMMAND.COM processes it. Most users can disregard it, which I recommend they do.
COMMAND
COMMAND is the program which processes instructions entered by users. Several parameters are possible. (/E: /L: /U: /P /MSG /LOW /Y /C /K) Type COMMAND /? for an explanation of what they are and how they're used.
Example: COMMAND /C DIR
COMSPEC
COMSPEC is an environment variable taking the string value of the location of the command interpreter. It is used whenever a replacement command interpreter is provided, or when COMMAND.COM is located other than in the root directory of the boot drive. Type SET to examine the current value of COMSPEC. (COMSPEC is not a command.)
Example: SET COMSPEC=C:\COMMAND.COM
COPY
The COPY command copies data. Although most often used to copy files, COPY can also copy data between devices. (Example: COPY CON: PRN: would make a computer act somewhat like a typewriter.) COPY can work with multiple files. COPY can append files. Type COPY /? for more information.
COPY can be controlled by the setting of the COPYCMD environment variable.
Example: COPY C:SOURCE.DAT D:DESTIN.DAT
CTTY
CTTY enables the system to be controlled by a terminal. Few will find this command useful.
DATE
DATE sets the system date. Type DATE, and the system will prompt for a new date. If no new date is provided, the system date remains unchanged.
Example: DATE 06-19-01
DEL
DEL deletes files. DEL /P will prompt before deletion. The DEL command is identical to ERASE.
Example: DEL C:\USELESS.JNK
DIR
DIR displays a list of the files in a directory. DIR action can be modified by /P,/W,/A,/O,/S,/B,/L,/V,/4. Type DIR /? for a description of DIR parameters.
DIR can be controlled by the setting of the DIRCMD environment variable.(I use SET DIRCMD=/OGNE, (Order (Group directories first), Name, Extension)
Example: DIR C:\WINDOWS\SYSTEM\*.DLL
DO
DO is a piece of the FOR ... IN ... DO command. See FOR
ECHO
ECHO is commonly used in .BAT files to control the display of text and commands. See @_Sign
ECHO can take a number of forms
1. ECHO without parameters will display the ECHO status (ON or OFF) 2. ECHO ON enables the screen display of commands 3. ECHO OFF disables the screen display of commands 4. ECHO {text} displays the given {text} 5. ECHO. Displays a blank line (No space between ECHO and Period.)
ERASE
ERASE deletes files. ERASE /P will prompt before deletion. The ERASE command is identical to DEL.
Example: ERASE D:\TEMPO???.JNK
ERRORLEVEL
ERRORLEVEL is an environment variable where the exit code of programs is stored. Commonly, .BAT files test the value of ERRORLEVEL to determine subsequent action.
Example: IF ERRORLEVEL 3 GOTO OOPS
EXIST
EXIST tests for the existance of a file. EXIST is typically used in .BAT files.
Example: IF EXIST FILENAME.EXT ECHO File found!
Example: IF EXIST BAD_DAT.JNK DEL BAD_DAT.JNK
EXIT
EXIT terminates execution of COMMAND.COM, or equivalently, closes a DOS Window. Typically, EXIT terminates only copies of the command shell, and not the original.
(EXTENSION) BAT COM EXE
EXTENSION .BATEXTENSION .COMEXTENSION .EXE
The command shell examines the file extension of commands to determine how those commands should be processed. .BAT files contain text that COMMAND.COM interprets and executes within its own code. .COM and .EXE files contain code which is first loaded into memory and then execution becomes the responsibility of that code. On termination, control is passed back to COMMAND.COM and the program resources are recovered.
Commands are given by the filename, omitting the extension. COMMAND.COM checks for .BAT files first, .COM files next, and .EXE files last.
.COM files are specialized .EXE files. Their use is being discouraged.
FOR
FOR %v IN (set) DO {command and its parameters} is a looping control command. It performs repetitive tasks from either the keyboard or a .BAT file.
Notes:
1. FOR executes {command} for each item in (set). 2. When used in a .BAT file, use %%v in place of %v. 3. %v is a single character variable (don't use 0-9) 4. The parenthesis in (set) are required 5. Example: FOR %A in (*.TXT) DO DIR %A
GOTO
GOTO is a .BAT file command. GOTO causes execution of the .BAT file to jump to the label specified in the GOTO command. Labels are text tags commencing with a colon. GOTO commands are often combined with IF statements.
Example: IF NOT EXIST filename.ext GOTO Error
IF
IF tests a condition in .BAT files.
Types of conditions:
1. IF ERRORLEVEL num 2. IF str1==str2 3. IF EXIST filename 4. IF NOT ERRORLEVEL num 5. IF NOT str1==str2 6. IF NOT EXIST filename
Example: IF NOT "%1"=="FILENAME.EXT" TYPE FILENAME.EXT
IN
IN is a piece of the FOR ... IN ... DO command. See FOR
LABEL
LABEL in a .BAT file begins with a colon
Example:{command}:LABEL{command}
LFNFOR
LFNFOR enables or disables long file names when using FOR command. Type LFNFOR to display current status.
Example: LFNFOR ON
LH
LH Loads programs into upper memory. LH is identical to LOADHIGH.
Example: LH DOSKEY C=C: $T CD \
LOADHIGH
LOADHIGH Loads programs into upper memory. LOADHIGH is identical to LH.
Example: LOADHIGH DOSKEY C=C: $T CD \
LOCK
LOCK enables direct disk access. See UNLOCK and 15668587
MD
MD creates a new directory or subdirectory. MD is identical to MKDIR.
Example: MD \NEW_SUB
MKDIR
MKDIR creates a new directory or subdirectory. MKDIR is identical to MD.
Example: MKDIR \NEW_SUB
NAME
To the best of my knowledge, NAME isn't a DOS command, reserved word, or variable. If I ever figure out why it's here, I'll update this page. (NAME is found inside the code of COMMAND.COM)
NOT
NOT negates the conditional results in IF commands.
Example: IF NOT EXIST EMERGNCY.DAT COPY PRECIOUS.DAT EMERGNCY.DAT
NUL
NUL is a re-direction destination. It is used to re-direct unwanted output. In this example, the confirmation for the command is suppressed.
Example: LOADHIGH DOSKEY /INSERT > NUL
PATH
PATH is an environment variable. Path can be set by the PATH command, or using SET. Semi-colons separate paths. Multiple paths are seached beginning from the left entry.
Example:
1. PATH C:\;C:\WINDOWS\COMMAND;D:\UTILITY 2. PATH C:\ 3. PATH ; {Clears the path so only current directory gets searched} 4. PATH {Displays current path setting} 5. SET PATH=C:\;C:\WINDOWS\COMMAND;D:\UTILITY 6. SET PATH=:\ 7. SET PATH= {This form removes PATH environment variable}
PAUSE
PAUSE suspends execution, displays a "Press any key to continue..." message, and waits for a keypress. PAUSE is often used with ECHO to create user friendly prompts.
Example:
{commands}ECHO Press Ctrl-C to abort programPAUSE{commands}
PROMPT
PROMPT is an environment variable. Prompt can be set by the PROMPT command or by using SET. Use PROMPT /? to display a list of symbols recognized by the PROMPT command. (Special symbols are required so they are passed to PROMPT instead of being interpreted by DOS) See 15979481
Example:
1. PROMPT $P 2. PROMPT It is now $D $T 3. SET PROMPT=$P$G
PROMPT uses the following codes as well as normal characters:
1. $_ Carriage return and linefeed 2. $Q = (equal sign) 3. $$ $ (dollar sign) 4. $D System date 5. $T System time 6. $N Current drive only 7. $P Current drive and path 8. $V Windows version number 9. $G > (greater-than sign) 10. $L < (less-than sign) 11. $B (pipe symbol) 12. $H Backspace (erases previous character) 13. $E Escape code (ASCII code 27 or 1BH)
RD
RD, or RMDIR removes a directory or subdirectory. The directory must be empty.
Example: RD \NOTNEED
REDIRECTION
REDIRECTION alters the normal data flow. The commands available are:
1. < (Less Than), 2. > (Greater Than) 3. (Vertical Bar (On my keyboard, above the left leaning slash))
The data source is to the right ofThe data source is to the left of and the destination to the right
Example1: SORT SCRAMBLED.TXT > ORDERED.TXTExample2: SORT <> ORDERED.TXTExample1: ECHO Line of text > TEXTFILE.TXTExample2: TYPE LONGLIST.TXT SORT MOREExample3: DEBUG <> MEMSTUFF.TXTExample6: DIR > DIRLIST.TXTExample7: XCOPY C:\*.LOG D: > NUL
REM
REM creates a remark. Remarks are not processed by .BAT files or CONFIG.SYS file. All text following REM is disregarded.
Example: REM -- These drivers are being tested. Remove if troublesome.
REN
RENAME, or REN, re-names a file name. A new drive cannot be specified.
Example:
1. REN FILE_HI.DOG FILE_LO.CAT 2. REN BIG_NUM.* BIG_NUM.RED 3. REN D:\TEST\ONE.ONE D:\TEST\TWO.TWO
RENAME
RENAME, or REN, re-names a file name. A new drive cannot be specified.
Example:
1. RENAME FILE_HI.DOG FILE_LO.CAT 2. RENAME BIG_NUM.* BIG_NUM.RED 3. RENAME D:\TEST\ONE.ONE D:\TEST\TWO.TWO
RMDIR
RMDIR, or RD removes a directory or subdirectory. The directory must be empty.
Example: RMDIR \NOTNEED
SET
SET assigns a string value to an environment variable.
Example: SET TODAY=Monday
SHIFT
SHIFT changes the position of parameters in batch files, copying %2 to %1, %3 to %2 ...
Notes:
1. SHIFT is needed when more than 10 parameters are required (DOS supports only %0 to %9) 2. %0 disappears 3. IF should be used to test if additional parameters are available 4. SHIFT is commonly used in .BAT files using variable numbers of parameters
TIME
TIME sets the system time. Type TIME, and the system will prompt for a new time. If no new time is provided, the system time remains unchanged.
TRUE
To the best of my knowledge, TRUE isn't a DOS command, reserved word, or variable. If I ever figure out why it's here, I'll update this page. (TRUE is found inside the code of COMMAND.COM)
TYPE
TYPE displays text files.
Example: TYPE C:\TEXT\STORY.TXT
UNLOCK
UNLOCK disables direct disk access. See LOCK
VER
VER displays the DOS version.
VERIFY
VERIFY controls DOS disk write verification.
1. VERIFY without parameters will display the VERIFY status (ON or OFF) 2. VERIFY ON causes DOS to check that files are written correctly 3. VERIFY OFF causes DOS to skip the verification.
VOL
VOL displays the disk volume label and serial number
MS-DOS External Command SummaryATTRIB.EXE
ATTRIB.EXE sets the attributes for one or more files. DOS marks files as Read_Only, Archive, System, or Hidden.
Example clears R&A, sets S&H: ATTRIB -R -A +S +H *.SYS
CHKDSK.EXE
CHKDSK performs a quick test of the disk and reports disk statistics. Windows offers SCANDISK, a superior utility to perform the same task. See 9065977
Example: CHKDSK D:
CHOICE.COM
Asks user to select one of given choices, then sets ERRORLEVEL to location where choice appears in list. See ERRORLEVEL
Example: CHOICE /C:ABCDEFG /T:C,3 Pick one from list
DEBUG.EXE
A debugging tool. DEBUG can edit programs and data.
This is one of those programs where those who know how to use it do not need any explanations from me. Those who know little or nothing about it should not attempt using it.
DELTREE.EXE
DELTREE deletes a directory, its subdirectories, and all files in both. Carelessness with DELTREE can have disasterous consequences.
Example: DELTREE /Y D:\JUNK
DISKCOPY.COM
DISKCOPY makes a duplicate of floppy disks. Both disks must be similar.
Example: DISKCOPY A: B: /V
DOSKEY.COM
DOSKEY a TSR (Terminate and Stay Resident) utility which enhances keyboard command entry. See 11098062 and 14132028
DOSKEY can...
1. Recall previous commands 2. Edit previous commands 3. Create macros 4. Recall macros 5. Display command history 6. Search command history 7. Select recalled commands by number
Example to display macros: DOSKEY /M
EDIT.COM
EDIT is a full screen text editor.
Example: EDIT HI_MOM.TXT
EXTRACT.EXE
EXTRACT will create files from data stored in .CAB (cabinet) files.
Example: EXTRACT C:\WINDOWS\SYSBCKUP\RB001.CAB SYSTEM.INI
FC.EXE
FC, or File Compare, displays the differences between files
Example: FC FEMALE.TXT MALE.TXT {Should find quite a few! (^_^)}
FDISK.EXE
FDISK prepares the disk for MS-DOS FORMAT. FDISK will divide a disk into partitions. FDISK displays screens with questions: provide the answers and pray. See FORMAT
FIND.EXE
FIND searches for text strings. Text can be in files, entered through the keyboard, or re-directed by DOS.
Example: FIND "PMS" WITCHDOS.HTM
FORMAT.COM
FORMAT prepares a disk for MS-DOS. See FDISK
Example formats a bootable floppy: FORMAT A: /S
DO NOT USE FORMAT /SELECT /U
FORMAT /Z:n sets cluster size to 2^(n+8) with n>0
IEXTRACT.EXE
IEXTRACT extracts a file from an IE backup information (.DAT) file. Microsoft has me baffled. I don't have a clue what this does or why it would be used. (I've lived over 50 years without IEXTRACT, and I plan on continuing that way!)
KEYB.COM
KEYB configures the keyboard for use with another language or character set.
LABEL.EXE
Changes, creates, or deletes the disk volume label. Labels can be up to eleven characters.
Example: LABEL C: WIN98_DISK
MEM.EXE
MEM displays the system (DOS) memory usage.
Example: MEM /D /P
MODE.COM
MODE configures system devices. Typically, communication and printer ports would be configured using MODE in DOS. Windows makes MODE unnecessary in most cases.
Example: MODE COM2: BAUD=9600 PARITY=NONE DATA=8 STOP=1 RETRY=N
MORE.COM
MORE displays data in one screen pieces. MORE can display a file or data re-directed by DOS.
Example1: MORE BIG_LONG.TXT
Example2: TYPE BIG_LONG.TXT MORE
MOVE.EXE
MOVES a file from one location to another. MOVE also allows renaming. MOVE would be the equivalent of a COPY followed a DELETE of the original.
Example: MOVE D:ONE_FILE.TXT E:TWO_FILE.TXT
MSCDEX.EXE
MSCDEX, or Microsoft CD Executable, enables DOS to control the CD drive. Using MSCDEX is a two step process. First, a CD driver must be loaded in the CONFIG.SYS file giving the CD device a name. Next, that name must be given to MSCDEX. MSCDEX is usually placed in the AUTOEXEC.BAT file. When these two requirements are met, DOS can use the CD drive. See 15977771
Note: Windows provides code for access to the CD. MSCDEX is needed by DOS.
Example: MSCDEX /D:PMSW_CD /L:G
1. This example assumes CONFIG.SYS loads a driver with name set to PMSW_CD 2. I use DEVICE=OAKCDROM.SYS /D:PMSW_CD in my CONFIG.SYS file. 3. My CD ROM becomes G: drive.
MSD.EXE
MSD, or Microsoft System Diagnostics, displays hardware information. MSD will not run in a DOS window.
Example: MSD
NLSFUNC.EXE
NLSFUNC, or National Language Support Functions, enables DOS to load country specific language support.
SCANDISK.EXE
SCANDISK is the DOS equivalent of Windows ScanDisk. Use the Windows version if possible.
SCANREG.EXE
SCANREG is a DOS based Windows Registry tool. Although it can back up the registry, it's most useful for restoring a corrupt registry from previous a previous backup. SCANREG cannot run from a DOS window.
Example: SCANREG /RESTORE
SORT.EXE
SORT
Sort sorts text data. SORT can sort a file or data re-directed by DOS. See REDIRECTION
Example1: SORT /+8 SCRAMBLED.TXTExample2: SORT /R <> ORDERED.TXT
START.EXE
START causes a Windows program to execute from a DOS command prompt.
Hint: Use START in .BAT files.
Example: I use Norton SpeedDisk to defrag C: D: and E: in a .BAT file with...START /WAIT C:\PROGRA~1\NORTON~1\SD32.EXE C: /FSTART /WAIT C:\PROGRA~1\NORTON~1\SD32.EXE D: /FSTART /WAIT C:\PROGRA~1\NORTON~1\SD32.EXE E: /F
SUBST.EXE
SUBST causes a path to simulate a disk drive. Substitution cannot be deleted from within drive created by SUBST. In Example2, the command will not complete if M: is the current directory. SUBST without parameters displays active substitutions.
Hint: SUBST can save typing when using long path names.
Example1: SUBST M: C:\MYDOCU~1Example2: SUBST M: /D
SULFNBK.EXE
SULFNBK, or Long File Name Backup.
Windows recognizes long file names. DOS only sees 8.3 file names. Some DOS disk utilities can destroy Windows files. SULFNKB can help.
Windows watches DOS programs, and if they write an 8.3 file name, Windows will step forward and add the long name in addition. To use SULFNBK, we must disable this activity. Right click My Computer, select Properties, Performance Tab. Select File System, File System Properties, Troubleshooting tab. Check the Disable long name preservation, click OK, and restart the computer in Command Prompt Only mode. SULFNBK can now execute.
Note: On some systems, it's LFNBK, found in \tools\reskit\files\fnback on the Windows CD.
Example (Peek at long file name data on C:): SULFNBK /P C
SYS.COM
SYS makes a disk bootable. Both a source and destination for the system files can be given.
Example1 makes A: bootable: SYS C: A:Example2 makes A: bootable: SYS A:
XCOPY.EXE
XCOPY is an extensive copy utility with well over a dozen options. Select commands to eliminate ambiguity between destination files and directories.
Examples...
1. XCOPY C:\DEVELOP\*.* E:\SYSBACK\ /S 2. XCOPY C:\TRADING\*.* E:\TRADEBK\ /D:09-15-01 3. XCOPY C:\BUSYBOD\*.* E:\PERSONAL\ /A /C /Q /Y 4. XCOPY C:\DOSHELP\*.* E:\PROGRESS\ /K /U /R
@ (AT SIGN)
@ disables command echo. One common use is in .BAT files to supress the command display during execution. See ECHO
Example: @ECHO OFF
AUTOEXEC.BAT
AUTOEXEC.BAT is a batch file that will execute whenever the system boots. All DOS commands available for .BAT files are acceptable. See 14132028 and 16015262
Note: AUTOEXEC.BAT must be put in the root directory of the bootable drive.
BATCH
BATCH is not a DOS command.
Batch files, with the .BAT extension, are text files containing DOS commands. They are executed similarly to programs: from the DOS command line; Windows Start/Run; or through a Windows shortcut. See (@), AutoExec, Call, ClearScr, ECHO, Exit, For, GoTo, IF, Label, NUL, Pause, Remark, Shift, and 16015262
BOOT
BOOT is not a DOS command. Boot is a computer operation getting its name from the saying "To pull yourself up by the bootstraps." To boot, a computer executes just enough ROM code to read a disk. This disk contains sufficient code to perform all the work necessary for the system to start.
Early Windows machines first boot DOS, then load Windows code. Windows NT and Windows 2000 boot directly without first loading DOS.
See 15654080
BREAK
BREAK ON tells DOS to check for the user pressing the BREAK key periodically, even if the program is busy. BREAK OFF will tell DOS to only check for user keypresses when the program expects user input.
Type BREAK without parameters to determine current BREAK setting.
Example: BREAK OFF
CALL
The CALL command is used in a .BAT file to execute another .BAT file. When the CALLed .BAT file terminates, the CALLing .BAT file resumes execution. When secondary .BAT file is executed from within a .BAT file, the termination of the secondary .BAT file also terminates the execution of the original .BAT file too.
The CALL command can take parameters to be passed to the called file.
Example: CALL ANOTHER.BAT
CD
CD, or Change Directory, sets the default directory. CD .. (double periods) will change to the parent directory.
CD is identical to CHDIR.
Example: CD \WINDOWS\COMMAND
CHCP
CHCP, or Change Code Page will activate a new code page. CHCP without parameters will display the current code page.
CHDIR
CHDIR, or Change Directory, sets the default directory. CHDIR .. (double periods) will change to the parent directory.
CHDIR is identical to CD.
Example: CHDIR ..
CLS
CLS, or Clear Screen will blank the screen and put the cursor in the upper left corner following the command prompt. Although CLS is commonly used in .BAT files, the CLS command will work if typed from the keyboard.
CMDLINE
CMDLINE is an environment variable value made available to programs. Although it isn't a DOS command, it is included here because COMMAND.COM processes it. Most users can disregard it, which I recommend they do.
COMMAND
COMMAND is the program which processes instructions entered by users. Several parameters are possible. (/E: /L: /U: /P /MSG /LOW /Y /C /K) Type COMMAND /? for an explanation of what they are and how they're used.
Example: COMMAND /C DIR
COMSPEC
COMSPEC is an environment variable taking the string value of the location of the command interpreter. It is used whenever a replacement command interpreter is provided, or when COMMAND.COM is located other than in the root directory of the boot drive. Type SET to examine the current value of COMSPEC. (COMSPEC is not a command.)
Example: SET COMSPEC=C:\COMMAND.COM
COPY
The COPY command copies data. Although most often used to copy files, COPY can also copy data between devices. (Example: COPY CON: PRN: would make a computer act somewhat like a typewriter.) COPY can work with multiple files. COPY can append files. Type COPY /? for more information.
COPY can be controlled by the setting of the COPYCMD environment variable.
Example: COPY C:SOURCE.DAT D:DESTIN.DAT
CTTY
CTTY enables the system to be controlled by a terminal. Few will find this command useful.
DATE
DATE sets the system date. Type DATE, and the system will prompt for a new date. If no new date is provided, the system date remains unchanged.
Example: DATE 06-19-01
DEL
DEL deletes files. DEL /P will prompt before deletion. The DEL command is identical to ERASE.
Example: DEL C:\USELESS.JNK
DIR
DIR displays a list of the files in a directory. DIR action can be modified by /P,/W,/A,/O,/S,/B,/L,/V,/4. Type DIR /? for a description of DIR parameters.
DIR can be controlled by the setting of the DIRCMD environment variable.(I use SET DIRCMD=/OGNE, (Order (Group directories first), Name, Extension)
Example: DIR C:\WINDOWS\SYSTEM\*.DLL
DO
DO is a piece of the FOR ... IN ... DO command. See FOR
ECHO
ECHO is commonly used in .BAT files to control the display of text and commands. See @_Sign
ECHO can take a number of forms
1. ECHO without parameters will display the ECHO status (ON or OFF) 2. ECHO ON enables the screen display of commands 3. ECHO OFF disables the screen display of commands 4. ECHO {text} displays the given {text} 5. ECHO. Displays a blank line (No space between ECHO and Period.)
ERASE
ERASE deletes files. ERASE /P will prompt before deletion. The ERASE command is identical to DEL.
Example: ERASE D:\TEMPO???.JNK
ERRORLEVEL
ERRORLEVEL is an environment variable where the exit code of programs is stored. Commonly, .BAT files test the value of ERRORLEVEL to determine subsequent action.
Example: IF ERRORLEVEL 3 GOTO OOPS
EXIST
EXIST tests for the existance of a file. EXIST is typically used in .BAT files.
Example: IF EXIST FILENAME.EXT ECHO File found!
Example: IF EXIST BAD_DAT.JNK DEL BAD_DAT.JNK
EXIT
EXIT terminates execution of COMMAND.COM, or equivalently, closes a DOS Window. Typically, EXIT terminates only copies of the command shell, and not the original.
(EXTENSION) BAT COM EXE
EXTENSION .BATEXTENSION .COMEXTENSION .EXE
The command shell examines the file extension of commands to determine how those commands should be processed. .BAT files contain text that COMMAND.COM interprets and executes within its own code. .COM and .EXE files contain code which is first loaded into memory and then execution becomes the responsibility of that code. On termination, control is passed back to COMMAND.COM and the program resources are recovered.
Commands are given by the filename, omitting the extension. COMMAND.COM checks for .BAT files first, .COM files next, and .EXE files last.
.COM files are specialized .EXE files. Their use is being discouraged.
FOR
FOR %v IN (set) DO {command and its parameters} is a looping control command. It performs repetitive tasks from either the keyboard or a .BAT file.
Notes:
1. FOR executes {command} for each item in (set). 2. When used in a .BAT file, use %%v in place of %v. 3. %v is a single character variable (don't use 0-9) 4. The parenthesis in (set) are required 5. Example: FOR %A in (*.TXT) DO DIR %A
GOTO
GOTO is a .BAT file command. GOTO causes execution of the .BAT file to jump to the label specified in the GOTO command. Labels are text tags commencing with a colon. GOTO commands are often combined with IF statements.
Example: IF NOT EXIST filename.ext GOTO Error
IF
IF tests a condition in .BAT files.
Types of conditions:
1. IF ERRORLEVEL num 2. IF str1==str2 3. IF EXIST filename 4. IF NOT ERRORLEVEL num 5. IF NOT str1==str2 6. IF NOT EXIST filename
Example: IF NOT "%1"=="FILENAME.EXT" TYPE FILENAME.EXT
IN
IN is a piece of the FOR ... IN ... DO command. See FOR
LABEL
LABEL in a .BAT file begins with a colon
Example:{command}:LABEL{command}
LFNFOR
LFNFOR enables or disables long file names when using FOR command. Type LFNFOR to display current status.
Example: LFNFOR ON
LH
LH Loads programs into upper memory. LH is identical to LOADHIGH.
Example: LH DOSKEY C=C: $T CD \
LOADHIGH
LOADHIGH Loads programs into upper memory. LOADHIGH is identical to LH.
Example: LOADHIGH DOSKEY C=C: $T CD \
LOCK
LOCK enables direct disk access. See UNLOCK and 15668587
MD
MD creates a new directory or subdirectory. MD is identical to MKDIR.
Example: MD \NEW_SUB
MKDIR
MKDIR creates a new directory or subdirectory. MKDIR is identical to MD.
Example: MKDIR \NEW_SUB
NAME
To the best of my knowledge, NAME isn't a DOS command, reserved word, or variable. If I ever figure out why it's here, I'll update this page. (NAME is found inside the code of COMMAND.COM)
NOT
NOT negates the conditional results in IF commands.
Example: IF NOT EXIST EMERGNCY.DAT COPY PRECIOUS.DAT EMERGNCY.DAT
NUL
NUL is a re-direction destination. It is used to re-direct unwanted output. In this example, the confirmation for the command is suppressed.
Example: LOADHIGH DOSKEY /INSERT > NUL
PATH
PATH is an environment variable. Path can be set by the PATH command, or using SET. Semi-colons separate paths. Multiple paths are seached beginning from the left entry.
Example:
1. PATH C:\;C:\WINDOWS\COMMAND;D:\UTILITY 2. PATH C:\ 3. PATH ; {Clears the path so only current directory gets searched} 4. PATH {Displays current path setting} 5. SET PATH=C:\;C:\WINDOWS\COMMAND;D:\UTILITY 6. SET PATH=:\ 7. SET PATH= {This form removes PATH environment variable}
PAUSE
PAUSE suspends execution, displays a "Press any key to continue..." message, and waits for a keypress. PAUSE is often used with ECHO to create user friendly prompts.
Example:
{commands}ECHO Press Ctrl-C to abort programPAUSE{commands}
PROMPT
PROMPT is an environment variable. Prompt can be set by the PROMPT command or by using SET. Use PROMPT /? to display a list of symbols recognized by the PROMPT command. (Special symbols are required so they are passed to PROMPT instead of being interpreted by DOS) See 15979481
Example:
1. PROMPT $P 2. PROMPT It is now $D $T 3. SET PROMPT=$P$G
PROMPT uses the following codes as well as normal characters:
1. $_ Carriage return and linefeed 2. $Q = (equal sign) 3. $$ $ (dollar sign) 4. $D System date 5. $T System time 6. $N Current drive only 7. $P Current drive and path 8. $V Windows version number 9. $G > (greater-than sign) 10. $L < (less-than sign) 11. $B (pipe symbol) 12. $H Backspace (erases previous character) 13. $E Escape code (ASCII code 27 or 1BH)
RD
RD, or RMDIR removes a directory or subdirectory. The directory must be empty.
Example: RD \NOTNEED
REDIRECTION
REDIRECTION alters the normal data flow. The commands available are:
1. < (Less Than), 2. > (Greater Than) 3. (Vertical Bar (On my keyboard, above the left leaning slash))
The data source is to the right of
Example1: SORT SCRAMBLED.TXT > ORDERED.TXTExample2: SORT <> ORDERED.TXTExample1: ECHO Line of text > TEXTFILE.TXTExample2: TYPE LONGLIST.TXT SORT MOREExample3: DEBUG <> MEMSTUFF.TXTExample6: DIR > DIRLIST.TXTExample7: XCOPY C:\*.LOG D: > NUL
REM
REM creates a remark. Remarks are not processed by .BAT files or CONFIG.SYS file. All text following REM is disregarded.
Example: REM -- These drivers are being tested. Remove if troublesome.
REN
RENAME, or REN, re-names a file name. A new drive cannot be specified.
Example:
1. REN FILE_HI.DOG FILE_LO.CAT 2. REN BIG_NUM.* BIG_NUM.RED 3. REN D:\TEST\ONE.ONE D:\TEST\TWO.TWO
RENAME
RENAME, or REN, re-names a file name. A new drive cannot be specified.
Example:
1. RENAME FILE_HI.DOG FILE_LO.CAT 2. RENAME BIG_NUM.* BIG_NUM.RED 3. RENAME D:\TEST\ONE.ONE D:\TEST\TWO.TWO
RMDIR
RMDIR, or RD removes a directory or subdirectory. The directory must be empty.
Example: RMDIR \NOTNEED
SET
SET assigns a string value to an environment variable.
Example: SET TODAY=Monday
SHIFT
SHIFT changes the position of parameters in batch files, copying %2 to %1, %3 to %2 ...
Notes:
1. SHIFT is needed when more than 10 parameters are required (DOS supports only %0 to %9) 2. %0 disappears 3. IF should be used to test if additional parameters are available 4. SHIFT is commonly used in .BAT files using variable numbers of parameters
TIME
TIME sets the system time. Type TIME, and the system will prompt for a new time. If no new time is provided, the system time remains unchanged.
TRUE
To the best of my knowledge, TRUE isn't a DOS command, reserved word, or variable. If I ever figure out why it's here, I'll update this page. (TRUE is found inside the code of COMMAND.COM)
TYPE
TYPE displays text files.
Example: TYPE C:\TEXT\STORY.TXT
UNLOCK
UNLOCK disables direct disk access. See LOCK
VER
VER displays the DOS version.
VERIFY
VERIFY controls DOS disk write verification.
1. VERIFY without parameters will display the VERIFY status (ON or OFF) 2. VERIFY ON causes DOS to check that files are written correctly 3. VERIFY OFF causes DOS to skip the verification.
VOL
VOL displays the disk volume label and serial number
MS-DOS External Command SummaryATTRIB.EXE
ATTRIB.EXE sets the attributes for one or more files. DOS marks files as Read_Only, Archive, System, or Hidden.
Example clears R&A, sets S&H: ATTRIB -R -A +S +H *.SYS
CHKDSK.EXE
CHKDSK performs a quick test of the disk and reports disk statistics. Windows offers SCANDISK, a superior utility to perform the same task. See 9065977
Example: CHKDSK D:
CHOICE.COM
Asks user to select one of given choices, then sets ERRORLEVEL to location where choice appears in list. See ERRORLEVEL
Example: CHOICE /C:ABCDEFG /T:C,3 Pick one from list
DEBUG.EXE
A debugging tool. DEBUG can edit programs and data.
This is one of those programs where those who know how to use it do not need any explanations from me. Those who know little or nothing about it should not attempt using it.
DELTREE.EXE
DELTREE deletes a directory, its subdirectories, and all files in both. Carelessness with DELTREE can have disasterous consequences.
Example: DELTREE /Y D:\JUNK
DISKCOPY.COM
DISKCOPY makes a duplicate of floppy disks. Both disks must be similar.
Example: DISKCOPY A: B: /V
DOSKEY.COM
DOSKEY a TSR (Terminate and Stay Resident) utility which enhances keyboard command entry. See 11098062 and 14132028
DOSKEY can...
1. Recall previous commands 2. Edit previous commands 3. Create macros 4. Recall macros 5. Display command history 6. Search command history 7. Select recalled commands by number
Example to display macros: DOSKEY /M
EDIT.COM
EDIT is a full screen text editor.
Example: EDIT HI_MOM.TXT
EXTRACT.EXE
EXTRACT will create files from data stored in .CAB (cabinet) files.
Example: EXTRACT C:\WINDOWS\SYSBCKUP\RB001.CAB SYSTEM.INI
FC.EXE
FC, or File Compare, displays the differences between files
Example: FC FEMALE.TXT MALE.TXT {Should find quite a few! (^_^)}
FDISK.EXE
FDISK prepares the disk for MS-DOS FORMAT. FDISK will divide a disk into partitions. FDISK displays screens with questions: provide the answers and pray. See FORMAT
FIND.EXE
FIND searches for text strings. Text can be in files, entered through the keyboard, or re-directed by DOS.
Example: FIND "PMS" WITCHDOS.HTM
FORMAT.COM
FORMAT prepares a disk for MS-DOS. See FDISK
Example formats a bootable floppy: FORMAT A: /S
DO NOT USE FORMAT /SELECT /U
FORMAT /Z:n sets cluster size to 2^(n+8) with n>0
IEXTRACT.EXE
IEXTRACT extracts a file from an IE backup information (.DAT) file. Microsoft has me baffled. I don't have a clue what this does or why it would be used. (I've lived over 50 years without IEXTRACT, and I plan on continuing that way!)
KEYB.COM
KEYB configures the keyboard for use with another language or character set.
LABEL.EXE
Changes, creates, or deletes the disk volume label. Labels can be up to eleven characters.
Example: LABEL C: WIN98_DISK
MEM.EXE
MEM displays the system (DOS) memory usage.
Example: MEM /D /P
MODE.COM
MODE configures system devices. Typically, communication and printer ports would be configured using MODE in DOS. Windows makes MODE unnecessary in most cases.
Example: MODE COM2: BAUD=9600 PARITY=NONE DATA=8 STOP=1 RETRY=N
MORE.COM
MORE displays data in one screen pieces. MORE can display a file or data re-directed by DOS.
Example1: MORE BIG_LONG.TXT
Example2: TYPE BIG_LONG.TXT MORE
MOVE.EXE
MOVES a file from one location to another. MOVE also allows renaming. MOVE would be the equivalent of a COPY followed a DELETE of the original.
Example: MOVE D:ONE_FILE.TXT E:TWO_FILE.TXT
MSCDEX.EXE
MSCDEX, or Microsoft CD Executable, enables DOS to control the CD drive. Using MSCDEX is a two step process. First, a CD driver must be loaded in the CONFIG.SYS file giving the CD device a name. Next, that name must be given to MSCDEX. MSCDEX is usually placed in the AUTOEXEC.BAT file. When these two requirements are met, DOS can use the CD drive. See 15977771
Note: Windows provides code for access to the CD. MSCDEX is needed by DOS.
Example: MSCDEX /D:PMSW_CD /L:G
1. This example assumes CONFIG.SYS loads a driver with name set to PMSW_CD 2. I use DEVICE=OAKCDROM.SYS /D:PMSW_CD in my CONFIG.SYS file. 3. My CD ROM becomes G: drive.
MSD.EXE
MSD, or Microsoft System Diagnostics, displays hardware information. MSD will not run in a DOS window.
Example: MSD
NLSFUNC.EXE
NLSFUNC, or National Language Support Functions, enables DOS to load country specific language support.
SCANDISK.EXE
SCANDISK is the DOS equivalent of Windows ScanDisk. Use the Windows version if possible.
SCANREG.EXE
SCANREG is a DOS based Windows Registry tool. Although it can back up the registry, it's most useful for restoring a corrupt registry from previous a previous backup. SCANREG cannot run from a DOS window.
Example: SCANREG /RESTORE
SORT.EXE
SORT
Sort sorts text data. SORT can sort a file or data re-directed by DOS. See REDIRECTION
Example1: SORT /+8 SCRAMBLED.TXTExample2: SORT /R <> ORDERED.TXT
START.EXE
START causes a Windows program to execute from a DOS command prompt.
Hint: Use START in .BAT files.
Example: I use Norton SpeedDisk to defrag C: D: and E: in a .BAT file with...START /WAIT C:\PROGRA~1\NORTON~1\SD32.EXE C: /FSTART /WAIT C:\PROGRA~1\NORTON~1\SD32.EXE D: /FSTART /WAIT C:\PROGRA~1\NORTON~1\SD32.EXE E: /F
SUBST.EXE
SUBST causes a path to simulate a disk drive. Substitution cannot be deleted from within drive created by SUBST. In Example2, the command will not complete if M: is the current directory. SUBST without parameters displays active substitutions.
Hint: SUBST can save typing when using long path names.
Example1: SUBST M: C:\MYDOCU~1Example2: SUBST M: /D
SULFNBK.EXE
SULFNBK, or Long File Name Backup.
Windows recognizes long file names. DOS only sees 8.3 file names. Some DOS disk utilities can destroy Windows files. SULFNKB can help.
Windows watches DOS programs, and if they write an 8.3 file name, Windows will step forward and add the long name in addition. To use SULFNBK, we must disable this activity. Right click My Computer, select Properties, Performance Tab. Select File System, File System Properties, Troubleshooting tab. Check the Disable long name preservation, click OK, and restart the computer in Command Prompt Only mode. SULFNBK can now execute.
Note: On some systems, it's LFNBK, found in \tools\reskit\files\fnback on the Windows CD.
Example (Peek at long file name data on C:): SULFNBK /P C
SYS.COM
SYS makes a disk bootable. Both a source and destination for the system files can be given.
Example1 makes A: bootable: SYS C: A:Example2 makes A: bootable: SYS A:
XCOPY.EXE
XCOPY is an extensive copy utility with well over a dozen options. Select commands to eliminate ambiguity between destination files and directories.
Examples...
1. XCOPY C:\DEVELOP\*.* E:\SYSBACK\ /S 2. XCOPY C:\TRADING\*.* E:\TRADEBK\ /D:09-15-01 3. XCOPY C:\BUSYBOD\*.* E:\PERSONAL\ /A /C /Q /Y 4. XCOPY C:\DOSHELP\*.* E:\PROGRESS\ /K /U /R
How do I capture an image from a movie in Microsoft Windows Media Player?
Often a user may attempt to capture an image from a video in Microsoft Windows Media Player using the print screen button. Unfortunately when pasting the image into an image editor the capture will be a blank or black image.
Answer:
There are several different answers that can apply to this question. Depending on the type of movie that is being played and what codec it is using may change what will work and what will not work. We suggest going through each of the below recommendations, if a solution does not work continue down the list.
First Option:
While in Microsoft Windows Media Player press "CTRL + I", if the video you are watching is using a Microsoft supported movie file you should receive a "Save Captured Image" window, allowing you to save the image as "capture" or any other name.
Although this solution is a quick and easy solution, you may not get the results you want as the image will often be smaller and lesser quality then what you see when you press the keys. If you wish to capture better images at any size, even full screen try the second solution.
Second Option:
This solution should only be used to capture images from any video, once done it should be changed back as it may cause other issues. However, this should work with all types of video files.
1. Open Microsoft Windows Media Player.2. Click Tools and then Options.3. Within the Options window click the Performance tab.4. Within Performance click the Advanced button.5. In Video Acceleration Settings uncheck "Use Overlays"6. Click Ok.7. Finally, click Apply and then Ok in the Options window.
Final Option:
Use a third-party capturing program..
Answer:
There are several different answers that can apply to this question. Depending on the type of movie that is being played and what codec it is using may change what will work and what will not work. We suggest going through each of the below recommendations, if a solution does not work continue down the list.
First Option:
While in Microsoft Windows Media Player press "CTRL + I", if the video you are watching is using a Microsoft supported movie file you should receive a "Save Captured Image" window, allowing you to save the image as "capture" or any other name.
Although this solution is a quick and easy solution, you may not get the results you want as the image will often be smaller and lesser quality then what you see when you press the keys. If you wish to capture better images at any size, even full screen try the second solution.
Second Option:
This solution should only be used to capture images from any video, once done it should be changed back as it may cause other issues. However, this should work with all types of video files.
1. Open Microsoft Windows Media Player.2. Click Tools and then Options.3. Within the Options window click the Performance tab.4. Within Performance click the Advanced button.5. In Video Acceleration Settings uncheck "Use Overlays"6. Click Ok.7. Finally, click Apply and then Ok in the Options window.
Final Option:
Use a third-party capturing program..
Subscribe to:
Posts (Atom)