I'm having a senior moment . . .
I have many "X:\Root-Folders, each having only ONE \Sub-Folder with many files in each.
I would like to get rid of the \Root-Folders by moving all the \Subs to the \Root and then
deleting the "then" empty original \Root-Folders.
(getting old is hard to do)
Thanks
Peter
Moving SUB-FOLDERs
Moderator: DosItHelp
Re: Moving SUB-FOLDERs
Code: Select all
for /d %%i in ("X:\*") do for /d %%j in ("%%i\*") do (
move /-y "%%j" "X:\"
rd "%%i"
)
Steffen
Re: Moving SUB-FOLDERs
Thank you very much Steffen.
With a slight modification to your code, it worked perfectly.
I had made a mistake in my description. What I had was ...
X:\Root_Folders\Unwanted_Folders\Keeper_Folders\Files.
I needed to "move" all the Keeper Folders into their Root Folders.
All's well now. Thanks again.
Peter
With a slight modification to your code, it worked perfectly.
I had made a mistake in my description. What I had was ...
X:\Root_Folders\Unwanted_Folders\Keeper_Folders\Files.
I needed to "move" all the Keeper Folders into their Root Folders.
All's well now. Thanks again.
Peter