Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page




Reference number: CH000838

How to copy a directory / folder.

Question:

How to copy a directory / folder.

Answer:

Microsoft Windows 95, 98, ME, NT, 2000, XP, and 2003 users
MS-DOS users
Linux / Unix users

Microsoft Windows 95, 98, ME, NT, 2000, XP, 2003

To copy a folder in Windows follow the below steps. When copying a folder in Microsoft Windows everything in the folder including all files and subdirectories will be copied.

  1. Locate and highlight the folder you wish to copy.
  2. Right-click the folder and click Copy or click Edit and then Copy.
  3. Move to the location you wish to place the folder and all its contents and click Edit and then Paste or right-click and then click Paste.

MS-DOS users

To copy a directory in MS-DOS you will need to use the MS-DOS xcopy command.  Below is a basic example with each of the steps to do this in MS-DOS. If you need additional information about the xcopy command or additional examples see the above xcopy command page.

1. Move to the directory you wish to copy the directories and subdirectories to. In the below example we will be moving to the temp2 directory using the cd command.

cd\temp2

2. Once in the directory use the xcopy command to copy another directories subdirectories and contents. In the below example we're copying the temp3 contents into the temp2 directory. Keep in mind that this will not copy the actual directory "temp2" just the files and directories in that directory.

xcopy c:\temp3 /e

Once the above steps have been completed everything should be copied into the temp2 folder.

Linux / Unix users

To copy a directory with all subdirectories and files use the Linux / Unix cp command. Below is an example command of how you would use the cp command to copy files. Additional information about this command and other examples can also be found in the above cp link.

cp -r /home/hope/files/* /home/hope/backup

In the above example the cp command would copy all files, directories, and subdirectories in the /home/hope/files directory to the /home/hope/backup directory.

Additional information:

  • See our directory and/or folder dictionary definitions for additional information about each of these terms.
  • See document CH000766 for additional information about copying files.

 

 

 

Index


Category:
Linux / Unix Q&A
MS-DOS Q&A
Windows 95 Q&A
Windows 98 Q&A
Windows ME Q&A
Windows NT Q&A
Windows 2000 Q&A
Windows XP Q&A

Companies:
Various

Related Pages:
 

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope