I have a script that extracts all files from all sub-directories and deletes the empty sub-directories afterwards, the part that extracts reads:
for /r %%a in (*.*) do move "%%a" "%~dp0"
Is there a way to do this with the exception of sub-directories named "_Unsorted"? I know xcopy has an /exclude
option, so something like
for /r %%a in (*.*) do xcopy "%%a" "%~dp0" /exclude "\_Unsorted\"
would almost work, but I'm not sure how to delete the original after it's copied to essentially have the same result as move