Chapter 2 (2)
Chapter 2 (2)
cd c:\temp
2.dir
• Display a list of files and subdirectories in a directory
• dir • dir/p
• dir *.exe • dir/w
• dir *.txt *.doc • dir /w/s/p
• dir /ad • dir /on
• dir /ar • dir>myfile.txt
• dir/s
3.copy
• Allows you to copy one or more files to an alternate location
• other variations – xcopy (for hidden file)
• copy *.txt c:\
• copy *.* a:
• copy autoexec.bat c:\windows
• copy win.ini c:\windows /y
• copy “myfile.txt” music
• copy myfile1.txt+myfile2.txt
• copy con text.txt(to create file, press ctrl+z t0 save- simply
just edit!!)
4.del
• Del is a command used to delete files from the computer
• remember deleted files by cmd Don't go to recycle bin.
• use ‘rmdir’ or ‘deltree’ for delete directory
• del test.tmp
• del c:\windows\text.tmp
• del c:\windows\temo\*.* (delete all files)
• del c:\windowstemp\?est.tmp (? character for
delete files such as pest.tmp or nest.tmp)
5. edit