I'm trying to move all files that are in a level-three sub-directory structure up one level.
A:\mozartBilder\Box 03 - Divertimenti, Serenades\CD02\img\folder.jpg
I basically want to get rid of the img
sub-directory, but keep its contents one level above.
These are of my 180 cd collection of Mozart's Works. There are 180 cds, 17 Box Sets, each box containing ~11 cds. Each picture was placed in this exact structure:
A:\mozartBilder\Box*number1-17\CD*1-11\img\folder.jpg
What I want to achive is that the folder.jpg
gets moved up one directory.
So to go from
A:\mozartBilder\Box 03 - Divertimenti, Serenades\CD02\img\folder.jpg
to
A:\mozartBilder\Box 03 - Divertimenti, Serenades\CD02\folder.jpg
I've searched on SuperUser and found people with similar questions, however none of the provided solutions worked for me.
For this code:
A:\mozartBilder>for /r %i in ("img\folder.jpg") do move %i %~pi..
I get this error:
A:\mozartBilder>move A:\mozartBilder\Box 02 - Serenades, Dances, Marches\CD03\"img\folder.jpg" \mozartBilder\Box 02 - Serenades, Dances, Marches\CD03\"img\..
The syntax of the command is incorrect.
gci A:\mozartBilder folder.jpg -recurse | select fullname
A:\mozartBilder\BOX***\CD01\img\folder.jpg --> A:\mozartBilder\BOX***\CD01\folder.jpg