CAMMAND PROMPT: Parameter Description [:][] Specifies the - TopicsExpress



          

CAMMAND PROMPT: Parameter Description [:][] Specifies the drive and directory for which you want to see a listing. [] Specifies a particular file or group of files for which you want to see a listing. /p Displays one screen of the listing at a time. To see the next screen, press any key on the keyboard. /q Displays file ownership information. /w Displays the listing in wide format, with as many as five file names or directory names on each line. /d Displays the listing in the same format as /w, but the files are sorted by column. /a[[:]] Displays only the names of those directories and files with the attributes that you specify. If you omit /a, dir displays the names of all files except hidden and system files. If you use /a without specifying Attributes, dir displays the names of all files, including hidden and system files. The following list describes each of the values that you can use for Attributes. Using a colon (:) is optional. Use any combination of these values, and do not separate the values with spaces. d Directories h Hidden files s System files l Reparse points r Read-only files a Files ready for archiving i Not content indexed files - Prefix meaning not /o[[:]] Sorts the output according to SortOrder, which can be any combination of the following values: n By name (alphabetical) e By extension (alphabetical) g Group directories first s By size (smallest first) d By date/time (oldest first) - Prefix to reverse order noteNote Using a colon is optional. Multiple values are processed in the order in which you list them. Do not separate multiple values with spaces. If SortOrder is not specified, dir /o lists the directories in alphabetic order, followed by the files, which are also sorted in alphabetic order. /t[[:]] Specifies which time field to display or use for sorting. The following list describes each of the values you can use for TimeField: c Creation a Last access w Last written /s Lists every occurrence of the specified file name within the specified directory and all subdirectories. /b Displays a bare list of directories and files, with no additional information. /b overrides /w. /l Displays unsorted directory names and file names in lowercase. /n Displays a long list format with file names on the far right of the screen. /x Displays the short names generated for non-8dot3 file names. The display is the same as the display for /n, but the short name is inserted before the long name. /c Displays the thousand separator in file sizes. This is the default behavior. Use /-c to hide separators. /4 Displays years in four-digit format. /? Displays help at the command prompt. Command and Usage Examples ATTRIB Change file attributes. + adds an attribute, - removes it. Attributes are: A=archive; R=read only; S=system; H=hidden. ATTRIB -R -A -S -H All these attributes will be removed from virus.exe. C: Go to the C: drive. Similarly A: and D: etc. C: CD Change directory. When you change directory, the prompt changes, showing the path of the directory you are currently in. Note, directory is the term used by DOS for what Windows calls a folder. CD\ takes you to the top of the directory tree (typically to C:) . CD.. moves you one level up the directory tree (i.e. up towards the root directory). CD takes you to that directory. You can use one or more subdirectory names, separated by \ e.g. CD WINNT\Media takes you to the directory C:\WINNT\Media To change to another path, type the full path with slashes. e.g. CD \WINDOWS\SYSTEM CLS Clear the screen. CLS DEL Delete one or more files in the current directory. Can be used with the * and the ? wildcards. DEL *.* will delete ALL files in the current directory, USE WITH CAUTION. (Note: DEL cannot be used to delete directories. Use RD to remove a directory.) DEL deletes virus.exe DEL *.JPG will delete all files with the extension JPG. DEL MY*.* will delete all files beginning with MY and with any extension. DEL MY??.* will delete files that are 4 characters long and begin with MY and with any extension. DIR Displays the contents of a directory (folder). Note, directory is the term used by DOS for what Windows calls a folder. These switches can be combined, so DIR /W /P will return multiple rows listing a page at a time. You can use the * and the ? wildcards to search for a particular file. The ? character represents ONE character, and the * character represents multiple characters. DIR *.* lists all the files in a directory. DIR displays all files and folders in the current directory. Folders are indicated in the list by . Files are usually listed by name. DIR /P displays the contents a page at a time, i.e. as many as will fit in your command line window. Press any key to display the next page. DIR /W displays the files/folders in multiple rows. This view gives less information per file. DIR *.JPG displays all files with the extension JPG in the current directory and all subdirectories. DIR MY??.* displays all files beginning with MY, exactly 4 characters long, and with any extension. DIR /S lists the contents of all subdirectories. DIR /AH displays all hidden files. EDIT Runs DOS EDIT (a simple text editor). Useful for editing batch files and viewing logs. This command requires QBASIC.EXE to be present. EDIT opens the file viruslog.txt and allows you to edit it. EDIT creates a new file called newfile.txt and opens it up for you to edit. HELP Displays DOS Help. For help on an individual command, type HELP then the command for which you want more information. HELP DIR displays information on the DIR command. MD Make directory. Creates a new directory below the current one. (The command can also be written as MKDIR) MD creates a new directory called Newdir. PRINT Prints the specified file (if the printer is supported in DOS - many are not). PRINT Prints LOGFILE.TXT RD Remove directory. Removes a subdirectory of the current directory. The directory you want to remove must be empty of all files. (The command can also be written as RMDIR) RD RENAME Rename a file. You must use the full file name including the suffix. RENAME TYPE Displays the contents of a file on the screen. If you use this command on a file which is not a text file, the display will be unintelligible. Use with |MORE to display the text on a page by page basis, and prevent it scrolling off the screen. | is a pipe character. TYPE C:\README.TXT|MORE > When you run a DOS command, output is usually sent to the screen. Use > to redirect output from the screen to a file. It runs the command preceding the >, creates a file in the current directory with the name you specify, and sends the information/output returned by the command, to that file. COMMAND > FILENAME.TXT e.g. SWEEP > REPORT.TXT The details of any infected files reported by SWEEP are sent to a file called REPORT.TXT.
Posted on: Sat, 16 Nov 2013 23:59:44 +0000

Trending Topics



Recently Viewed Topics




© 2015