< Day Day Up > |
Using RENAME ( REN )The RENAME command (can be abbreviated REN ) can be used to rename one or more files through the use of the ? and * wildcards. RENAME uses the same syntax with any version of Windows: J:\>rename /? Renames a file or files. RENAME [drive:][path]filename1 filename2. REN [drive:][path]filename1 filename2. Note that you cannot specify a new drive or path for your destination file. For example, RENAME MYDOC.DOC MYNOVEL.DOC changes MYDOC.DOC to MYNOVEL.DOC . RENAME *.BAK *.OLD changes all *.BAK files in the current folder to *.OLD.
Using VERThe VER (Version) command can be used to determine the exact version of Windows in use. Unlike DIR , VER has no optional switches. To use the VER command
Table WCR.1 lists major version information for the Windows versions covered on the A+ Certification Exam. Table WCR.1. Windows Version Information As Displayed by VER
Using COPYThe COPY command copies files from one drive and folder to another folder and drive. The folder specified by COPY must already exist on the target drive. COPY will not work with files that have the system or hidden file attributes; to copy these files, use XCOPY32 instead. The options for COPY (Windows 9x/Me) are A:\>COPY/? Copies one or more files to another location. COPY [/A /B] source [/A /B] [+ source [/A /B] [+ ...]] [destination [/A /B]] [/V] [/Y /-Y] source Specifies the file or files to be copied. /A Indicates an ASCII text file. /B Indicates a binary file. destination Specifies the directory and/or filename for the new file(s). /V Verifies that new files are written correctly. /Y Suppresses prompting to confirm you want to overwrite an existing destination file. /-Y Causes prompting to confirm you want to overwrite an existing destination file. The switch /Y may be preset in the COPYCMD environment variable. This may be overridden with /-Y on the command line To append files, specify a single file for destination, but multiple files for source (using wildcards or file1+file2+file3 format). Windows 2000/XP add the following options: Default is to prompt on overwrites unless COPY command is being executed from within a batch script. /D Allow the destination file to be created decrypted /N Uses short filename, if available, when copying a file with a non-8dot3 name. /Z Copies networked files in restartable mode. To use the COPY command
Here are some examples:
Using SETThe SET command is used to view or change environmental variables; these variables affect the operation of Windows and specific hardware or software. With Windows 9x/Me, SET statements can be placed in Autoexec.bat for execution at the next startup. To configure the current command-prompt session in Windows NT/2000/XP, you can use SET statements at the command prompt. tip
Open a command prompt and enter SET with no options to see the current environmental variables. Some typical uses for SET include
|
< Day Day Up > |