1 / 22

INTERNAL Commands

INTERNAL Commands. 1. CLS. Clears the screen. Syntax: C:cls. 2. DATE. Displays or sets the date. Syntax: DATE [date] Type DATE without parameters display the current date setting and a prompt for a new one.  Press ENTER to keep the same date. 3. TIME.

edolie
Download Presentation

INTERNAL Commands

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. INTERNALCommands

  2. 1. CLS • Clears the screen. • Syntax: C:\cls

  3. 2. DATE • Displays or sets the date. • Syntax: DATE [date] • Type DATE without parameters display the current date setting and a prompt for a new one.  Press ENTER to keep the same date.

  4. 3. TIME • Displays or sets the system time. • Syntax: TIME [time] • Type TIME with no parameters to display the current time setting and a prompt for a new one.  Press ENTER to keep the same time. • Example: time 12:00 Set the time to 12:00

  5. 4. COPY CON • Used to create a file. • Syntax: c:\>copy con filename.extension use F6 or Ctrl+Z keys to save the contents of file. • Example: Copy con test Hello everybody ^Z 1 file(s) copied.

  6. 5. TYPE • Displays a file. The more command is frequently used in conjunction with this command, e.g. type long-text-file | more. • Syntax: type filename

  7. 6. CD • Stands for change directory. It is used to find out the location of the file in the directory structure or it can also move us from one location in the directory structure to another. • Syntax C:\>CD dirname C:\>CD.. C:\>CD \

  8. 7. DIR • Lists the contents of a directory. The dir command typed by itself, displays the disk's volume label and serial number; one directory or filename per line, including the filename extension, the file size in bytes, and the date and time the file was last modified; and the total number of files listed, their cumulative size, and the free space (in bytes) remaining on the disk. • Syntax: dir [drive:][path][filename] [options]

  9. DIR Options • /W : Displays the listing in wide format. • /P : Pause at every page • /S : Also look in subdirectories • /Axx: Display files with the specified attributes only. Possible attributes for the A parameter are : • D:directories • R : read-only files • H :hidden files • A : files/directories with the archive bit on • S :system files • /L : Display forced into lowercase

  10. DIR Options • /Oxx: Modifies sort order. Possible sort orders are • N :name • S :size • E: extension • D: date and time • A : last access date • G : group directories first • /D : Display wide format but sorted by column • /B : Uses bare format • > [drive:][path]filename : To Store Result in a text file;(c:\dir > c:\fileList.txt)

  11. 8. MD • Makes a new directory. The parent of the directory specified will be created if it does not already exist. Syntax: md directory • Examples md test The above example creates the "test" directory in the directory you are currently in. md c:\test Create the "test" directory in the c:\ directory.

  12. 9. PROMPT • Changes the Windows command prompt. Syntax: PROMPT [text] text Specifies a new command prompt. • Type PROMPT without parameters to reset the prompt to the default setting. • The prompt can be made up of normal characters and the below special codes: • $Q= equal sign • $$$ dollar sign • $T Current time

  13. 9. Prompt(Contd…) • $D Current date • $P Current drive and path • $V Windows version number • $N Current drive • $G> greater-than sign • $L& less-than sign • $B| pipe • $H Backspace • $E Escape code (ASCII code 27) • $_ Carriage return and linefeed

  14. 10. COPY • Copies files from one location to another. The destination defaults to the current directory. If multiple source files are indicated, the destination must be a directory, or an error will result. • Syntax: copy [source\filename] [destination\folder] • Examples of usage: copy alpha.txt + beta.txt gamma.txt copy alpha.txt d:

  15. 11. DEL • Deletes one or more files. This command is used to delete a particular or more files. • Syntax: del filename erase filename • Options: *.* All files in current folder *.* /s all files in current folder and sub folders

  16. 12. REN • Renames a file. Unlike the move command, this command cannot be used to rename subdirectories, or rename files across drives. • Syntax: ren filenamenewname • Example: This example renames c:\windows\filex.txt to c:\windows\filey.txt ren c:\Windows\filex.txt filey.txt

  17. 13. RD • Used to remove a particular directory or subdirectory or from a disk. • Only an empty directory or subdirectory can be removed. • Syntax: rd directoryname • Example: C:\>rd test

  18. 14. VER • Used to see the current version of DOS. • Syntax: Ver • Example C:\>ver MS DOS version 6.22

  19. 15. VOL • Displays the volume information about the designated drive. • Syntax: Vol drivename • Example: C:\>Vol Volume in drive C has no label. Volume serial number is AA15-1FB0

  20. 16. PATH • Sets or displays directories that will be searched for programs not in the current directory. • Syntax: PATH [[drive:]path[;...]] • Examples C:\PATH ; clears all search-path settings and direct Windows to search only in the current directory. C:\PATH PATH without parameters to display the current path.

  21. Create the following directory structure in DOS on D drive.

  22. Copy the india directory to F drive. • Create a directory UT under India directory and copy chandigarh and delhi files to UT directory. • Delete shimla file and JK directory. • Rename himachal to HP. • Write a command which shows all directories under india directory.

More Related