Fast methods to copy(move) files in batch file
问题 I have a massive number of files in one directory that I need to validate. The problem was, the file explorer takes too much time to load the file list and my whole computer becomes slow. So I wrote the following code to group files by moving certain number of files(shown as %limit% and will be 700) to numbered folders(shown as %DirN% ) for /f "tokens=1-2 delims=:" %%a in ('dir /b /a-d ^|findstr /n /v ".bat .cmd .txt"') do if %%a lss %limit% robocopy "%cd%" "%cd%\%DirN%" "%%b" /mov >nul This