Merge multiple subfolders
Jun 26th, 2017
- ::find all "/needle/"'s under /source/, and merge in /target/clean/needle
- @echo off
- PUSHD %CD%
- SET "needle=home"
- SET "source=%CD%"
- SET "target=%CD%\clean\%needle%"
- FOR /d /r "%source%" %%G IN (*%needle%*) DO (
- ::/E = subfolders, including empty
- ::/NDL = no directory listing. Just summary, pls.
- ROBOCOPY /E /NDL "%%G" "%target%"
Please, Sign In to add comment