copy all files and folders from one drive to another drive using DOS (command prompt)

后端 未结 5 1471
孤城傲影
孤城傲影 2021-01-30 02:24

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, no

5条回答
  •  被撕碎了的回忆
    2021-01-30 02:54

    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

提交回复
热议问题