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 ...
First Before Writing the Program.Make sure you follow below procedures. 1.Open Notepad or any text editor 2.Next write your commands on your batch file 3.Then save your batch file as ".bat".For Example "myfirstprogram.bat " 4.Then open CMD and type file name along with your extension My First Program @echo off Title MY First Batch File echo Hello! echo This is My First Line echo This is MY second Line OutPut : Hello! This is My first Line This is MY second Line Snap:
DATE Purpose: Displays or sets the date. Syntax: To Set Date: Date [mm-dd-yyyy] To Display Date: Date /t Prameters: mm-dd-yyyy: sets the date specified /t: Displays the current date without prompting you for a new date. /?: Display help at command prompt. Example: Date 12-10-2017 and hit enter to set date
Comments
Post a Comment