150 likes | 389 Views
Internal Commands. DOS Commands Chapter 5. Gary DeRoest. File Management Summary. COPY command Using wild cards Using subdirectory markers Combining Files Printing files TYPE COPY. C:WUGXP. Create a directory named C:WUGXP which contains all files on your activities disk
E N D
Internal Commands DOS Commands Chapter 5 Gary DeRoest
File Management Summary • COPY command • Using wild cards • Using subdirectory markers • Combining Files • Printing files • TYPE • COPY
C:\WUGXP • Create a directory named C:\WUGXP which contains all files on your activities disk XCOPY A:\* C:\WUGXP /S /E /V
COPY Command • Consider the process of duplicating a file using the windows operating system • Right-click file choose copy • Move the the correct destination folder • Right-click to choose paste • Right-click to choose rename • Type the new filename
Duplicating Files • Why would you want to copy a file anyway?
COPY Command D:\> COPY C:\WUGXP\DANCES A:\DANCES Identify the file that is to be copied Identify the drive, directory and name of the new file COPY command name
COPY Command D:\> COPY C:\WUGXP\DANCES A:\NEWDANCES Identify the file that is to be copied Identify the drive, directory and name of the new file COPY command name
COPY Command D:\> COPY C:\WUGXP\*.TMP A:\*.NEW Identify the file that is to be copied Identify the drive, directory and name of the new file COPY command name
COPY Command D:\DATA>COPY C:\WUGXP\*.TMP A:\*.NEW
File Naming Rules • Names of files in a directory must be unique • File name <= 255 chars including extension • File extensions are optional • A dot (.) separates name from extension • Don’t use the following “ / \ : | < > * ?
Overwriting files • The COPY command can be used to replace a file that already exists • Warning messages will be displayed when a file is about to be overwritten • The user will then choose action • Yes(y) • No(n) • All(a)
TYPE Command • Used to display the text contents of a file • Displays without stop until finished TYPE C:\WUGXP\DANCES TYPE C:\WUGXP\PHONE\HPB.DAT TYPE C:\WUGXP\PHONE\HPB.EXE
Combining Files • The COPY command will allow users to combine the contents of two files into on file COPY FILE1 + FILE2 FILE3 COPY 1.TXT + 2.TXT + 3.TXT 6.TXT COPY *.TXT 6.TXT
Printing with TYPE • TYPE MER.TMP > PRN • TYPE MER.TMP > LPT1 • TYPE MER.TMP > LPT2 • ECHO ^L > PRN