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
)