Batch file 将包含子文件夹和文件的整个文件夹树复制到新目标
我正在使用Windows 7 x64,我想复制一些文件和文件夹。如何将自己定位到要复制的文件夹中,并将其中的所有内容移动到新的目标中 我试过stack的一些解决方案,但没有一个有效 编辑: 我试过这个密码Batch file 将包含子文件夹和文件的整个文件夹树复制到新目标,batch-file,Batch File,我正在使用Windows 7 x64,我想复制一些文件和文件夹。如何将自己定位到要复制的文件夹中,并将其中的所有内容移动到新的目标中 我试过stack的一些解决方案,但没有一个有效 编辑: 我试过这个密码 for /d /r "c:\" %%i in (*) do if exist "d:\newlocation\%%~ni" (dir "%%i" | find "0 File(s)" > NUL & if errorlevel 1 xcopy /y "%%i\*.*" "d:\
for /d /r "c:\" %%i in (*) do if exist "d:\newlocation\%%~ni" (dir "%%i" | find "0 File(s)" > NUL & if errorlevel 1 xcopy /y "%%i\*.*" "d:\newlocation\%%~ni") else (xcopy /y "%%i" "d:\newlocation")
xcopy /y c:\*.* d:\newlocation\
但它说了一些不好的参数
Edit2:我正在使用批处理文件。在cmd提示符下,
xcopy/?
。你试过哪一个?发生了什么?我更新了问题。有人吗?我今天需要这个。