i want to copy all files and folders from one drive to another drive using MS-DOS. How to do it?
I am trying xcopy I:\*.* N:\
But it copies only files, not folders. So how to copy all files and folders both?
Thanks.
Using the xcopy commandxcopy /h /c /k /e /r /y c:\ d:\ Copy hidden and system files. Normally xcopy skips these files, but if you specify this option, they are copied.
To copy a directory in MS-DOS, use the xcopy command.
Type "xcopy", "source", "destination" /t /e in the Command Prompt window. Instead of “ source ,” type the path of the folder hierarchy you want to copy. Instead of “ destination ,” enter the path where you want to store the copied folder structure. Press “Enter” on your keyboard.
xcopy "C:\SomeFolderName" "D:\SomeFolderName" /h /i /c /k /e /r /y
Use the above command. It will definitely work.
In this command data will be copied from c:\ to D:, even folders and system files as well. Here's what the flags do:
/h
copies hidden and system files also/i
if destination does not exist and copying more than one file, assume that destination must be a directory/c
continue copying even if error occurs/k
copies attributes/e
copies directories and subdirectories, including empty ones/r
overwrites read-only files/y
suppress prompting to confirm whether you want to overwrite a file/z
Copies over a network in restartable mode.more flags are found here https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/xcopy
Use xcopy /s I:\*.* N:\
This is should do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With