Professional Documents
Culture Documents
Windows CLI: (Ommand Ine Nterface)
Windows CLI: (Ommand Ine Nterface)
• If you can type fast, the command line will always be faster than a keyboard and
mouse – typing speed is the only limiting factor
• For most tasks it can be a lot faster using a command line than it can be using a GUI.
• Certain tasks can be done 10 to 100 times faster (some are impossible from a GUI )
• Very flexible with the use of “switches” (options)
• Good for “expert” users - can quickly access commands
• Uses the fewest system resources
• Need to memorize the commands – learning curve is steep
• Possibility of command chaining – use pipe and other operators
• Md ccis && dir
CLI vs GUI
• CLI (Command Line Interface) - Advantages
• Ability to go back and look at the history and replicate it on other machine
• Repeatability of commands
• Create scripts that can be used to automate processes
• DOS scripts are used on Windows machines
• Apple scripts are used in Mac machines etc.
• Used always by experts or specialists
• Command Line Interface Applications
• System administration
• Engineering applications
• Scientific applications
How to go to CLI?
• Start Click on search
Type “cmd” in the search window
Right
click and
select
“Pin to
taskbar”
Command Prompt Window
The first filename you enter is referred to as the source file. The
second filename you enter is referred to as the target file. If errors are
encountered during the copying process, the COPY program will
display error messages using these names.
Copying files
• Copy abc.doc myfile.doc - abc.txt and myfile.doc are same
• Copy a.txt + b.txt c.txt -Concatenate or Append
• Copy *.rtf d:\ccis\it -use wild cards
• Copy c:\windows\*.exe d:\Bhanu\impfiles - drive to drive
• Switches - /v (verify), /b (binary files), /d(decrypt), /y(overwrite?)
Renaming files/directories
• Ren or rename
• Used to rename files and directories from the original name to a new name.
• Ren old_name new_name
• Ren a.txt aa.txt
• Ren *.doc *.rtf
• Ren d:\Bhanu\ccis\it\aa.txt a2.txt
• Ren ccis ccit - Directories
Moving files
• move
• Allows you to move files or directories from one folder to another, or
from one drive to another.
• Moves one or more files to the location you specify. Can also be used
to rename directories.
• Move d:\ccis\a.txt d:\ccis\it\a.txt -just move
• Move d:\ccis\a.txt d:\ccis\it\file1.txt -move & rename
Tree command
• Allows the user to view a listing of files and folders in an easy to read
listing.
• Tree
• Tree /f - show files also
• Tree /a - graphic characters linked connecting lines
Attrib command
• Sets or displays the read-only, archive, system, and hidden attributes
of a file or directory.
• Attrib
• Attrib +r +s a.doc -makes the file read-only and system file
• If you use this command to specify a file as read-only, the file can be
accessed, but not altered or deleted.
• If a file has an attribute of -R, it can be both read from or written to (it
is referred to as read/write). If a file has an attribute of +R, it can be
read from, but not written to