Copying and Moving Files

If you do not like the location of your files or you want to rearrange your file structure, you can use the COPY and MOVE commands.

The COPY command copies the file(s) from the source directory to the destination directory. A copy of the file then exists in both the source and destination directories.

The MOVE command moves the file(s) from the source directory to the destination directory. The file then exists only in the destination directory.

click to expand

The syntax for performing a COPY is

COPY source path\filename destination path\filename 

For example:

COPY C:\TEST\TEST.DOC C:\DOCS\TEST.DOC

The syntax for performing a MOVE is

MOVE source path\filename destination path\filename 

For example:

MOVE C:\TEST\TEST.DOC C:\DOCS\TEST.DOC

start sidebar
Test It Out: Using COPY and MOVE Commands

In this exercise, you will copy and move files from one directory to another.

  1. At C:\TEST, create files TEST1.DOC, TEST2.DOC, TEST3.DOC, and MOVEME.DOC. Create the directory C:\DOCS.

  2. From C:\TEST, type COPY TEST1.DOC C:\DOCS and press Enter.

Note 

When you are working with a file that is located in the current directory, there is no need to type the entire path for the file in the command.

  1. Verify that the document was copied by using the DIR command at C:\TEST and C:\DOCS. Does TEST1.DOC exist in both directories?

  2. Type MOVE MOVEME.DOC C:\DOCS and press Enter.

  3. Verify that the document was moved by using the DIR command at C:\TEST and C:\DOCS. MOVEME.DOC should exist only in the C:\DOCS directory.

  4. Type COPY T*.DOC C:\DOCS and press Enter.

    Using this command, all documents in the C:\TEST directory that begin with a T and end with the extension DOC will all be copied to the C:\DOCS directory. Use this method to quickly move many like files all at once.

FAT32

File Allocation Table32. A 32-bit version of the FAT file system that will recognize drives larger than 2GB. FAT32 can adjust the size of the clusters (individual cells that are used to organize the data) on a hard drive to accommodate larger-sized drives.

end sidebar

start sidebar
Working with Filenames

There are different types of file systems. You can use FAT with DOS, which restricts the names of files and folders to only eight characters with a three-character extension. With Windows 9x, 95/98, Windows Me, Windows 2000, and Windows XP/Windows Server 2003, you can use FAT32 in addition to FAT. FAT32 makes better use of disk space, supports large disk sizes greater than 2GB, and improves disk performance.

If you are using DOS, file or folder names longer than eight characters are automatically assigned an abbreviated eight-character name. Sometimes the short names are not very intuitive. For this reason, it's a good idea to try to keep your filenames fairly short.

You should also note that DOS utilities, unlike Windows 9x, 95/98, Windows Me, Windows 2000, and Windows XP/Windows Server 2003, do not understand spaces in filenames or long filenames. If you have a filename with spaces or a long filename, use quotation marks around the filename when using DOS utilities.

end sidebar




MCSA. MCSE 2003 JumpStart. Computer and Network Basics
MCSA/MCSE 2003 JumpStart
ISBN: 078214277X
EAN: 2147483647
Year: 2003
Pages: 203
Authors: Lisa Donald

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net