DIR Purpose: Displays a list of files and subdirectories in a directory. Syntax: DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N] [/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4] Parameters: drive:][path][filename] Specifies drive, directory, and/or files to list. /A Displays files with specified attributes. attributes D Directories R Read-only files H Hidden files A Files ready for archiving S System files I Not content indexed files ...
DEL/ERASE Purpose: Deletes one or more files. Syntax: DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names Prameters: names Specifies a list of one or more files or directories. Wildcards may be used to delete multiple files. If a directory is specified, all files within the directory will be deleted. /P Prompts for confirmation before deleting each file. /F Force delet...
ENDLOCAL/SETLOCAL ENDLOCAL: The Endlocal command ends the localization of environment variables set by the Setlocal command and restores the variables to the values they held before the Setlocal command was used. If you use the Setlocal command but forget to add the Endlocal command, the command interpreter automatically restores the environment variables to the values they held before the Setlocal command was used.This command is not effective when used outside a batch file. SETLOCAL: The Setlocal command starts the localization of environment variables in a batch file.This localization continues until a matching Endlocal command is found.You should use the Setlocal and Endlocal commands only inside a batch file. Outside a batch file or a script file, these commands have no effect. Example: @Echo off Rem This command sets local variables Rem Localization ends when Rem Processing of Mybatch2.bat file is complete Setlocal Path=%path%;C:\Myfiles;...
Comments
Post a Comment