Monday, October 6, 2008

DOS File Manipulation

MS-DOS users

Below are steps on how to copy a single file from one directory to another directory as well as how to copy multiple files from one directory to another directory.

Copying a single file from one location to another.

  1. Using the cd command, move to the directory that contains the file you wish to copy.
  2. Type a command similar to the below command.

    copy myfile.txt c:\my\location

    In the above example, you would substitute "myfile.txt" with the name of the file you wish to copy, and "c:\my\location" with the directory you're copying to.

Copying multiple files to another location

  1. Using the cd command, move to the directory that contains the files you wish to copy.
  2. Once in the directory that contains the files you wish to copy, type a command similar to one of the below commands.

    copy *.* c:\mydir

    In the above example, the command would copy every file in the current directory to the "mydir" directory.

    copy *.txt c:\mydir

    In the above example, the command would copy every txt, or text file, in the current directory into the "mydir" directory.

Additional examples of wildcard characters can be found on our wildcard dictionary definition.

See our cd commanddir command, and/or our copy command pages for additional information about each of these MS-DOS commands.

No comments: