|
Command Line Usage
- Basic File Management
- Replace Active File using mv (from the Resource Kit).
mv /x /d {full path to THIS.DLL} {full patch to THAT.DLL} replaces, at next boot, the active file THAT.DLL with the [new] file THIS.DLL.
- Rename using ren or rename
ren this.txt that.txt renames "this.txt" in current directory to "that.txt".
ren *.html *.txt changes extensions of all HTML files (in current directory) to "txt".
FOR /r %a IN *.html DO ren "%a" *.txt changes extensions of all HTML files recursively (across subdirectories) to "txt".
mv /x /d {full path to THIS.DLL} {full patch to THAT.DLL} replaces, at next boot, the active file THAT.DLL with the [new] file THIS.DLL.
- Delete using del or rmdir
del this.doc deletes "this.doc" in current directory.
del *.doc deletes all DOC files in current directory.
del \*.txt \*.doc /s /q /f >nul 2>&1 deletes all TXT and DOC files recursively (across subdirectories) without nagging prompts.
- Parsing Files for String
FOR /r %a IN (*.txt) DO findstr thisstring "%a" searches folders recursively for a TXT file containing "thisstring".
|

Published in April 1998, Windows NT Shell Scripting, by Tim Hill, is the only book which covers both the basic NT commands, including the undocumented ones and/or switches, and shell scripting under Windows NT.
|
|