Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/158.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Command line 如何使用robocopy仅复制选定文件夹?_Command Line_Robocopy - Fatal编程技术网

Command line 如何使用robocopy仅复制选定文件夹?

Command line 如何使用robocopy仅复制选定文件夹?,command-line,robocopy,Command Line,Robocopy,我有一个目录,其中有36个子文件夹。我想用robocopy复制最后18个文件夹。我该怎么做?是否有任何选项可以使用?此批处理文件应跳过18个文件夹,然后对每个文件夹使用robocopy @echo off for /f "skip=18 delims=" %%a in (' dir /a-d /b ') do ( robocopy "%%a" "target folder" switches )

我有一个目录,其中有36个子文件夹。我想用robocopy复制最后18个文件夹。我该怎么做?是否有任何选项可以使用?

此批处理文件应跳过18个文件夹,然后对每个文件夹使用robocopy

@echo off
for /f "skip=18 delims=" %%a in (' dir /a-d /b ') do (
robocopy "%%a" "target folder" switches
)