Copy Folders in DOS

Your Windows OS (Operating System) is down. Dang… and you need a data seriously that you don’t want to bother installing another windows. So how do you do it. Yes, one can copy files using the DOS command.
Let’s say you’re in the command prompt c:\>

C:\> copy *.* a: (copies all file in the current folder you’re in into a: drive

Now you wanted to copy multiple folders for backup purposes onto another folder. This is the way one should do

C:\> xcopy foldername foldername copies all the folders and files inside into another folder

Now let’s say example from folder C:\>techiedan\ and all it’s subdirectories, I want to copy all this into another folder name C:\>blog\techiedan\.

C:\> xcopy techiedan blog\techiedan /e copies all the folders and files inside into another folder (use the /e for copying all folders and files)
use alternatively the /i if you have lots of folders so DOS won’t keep on asking whether content is a file or folder

DOS Copy XCopy Screenshot

Now you know this, so with this knowledge, you can start writing a schedule or a batch file to run this script at certain period to backup your files. 🙂

Leave a Reply