I've just started dabbling with Powershell & after searching many scripts, I have not found one that works. (Maybe I'm not running correctly, but I have enabled the right administrative rights, etc.)
My request:
A Powershell script which
- recursively goes through directory structure, to the last level
- moves all content (files with any extension), UP one-level, from where the files were
- after the move, removes that folder the files were moved from
◘ BEFORE ◘ Classical ├─Mozart-5 │ └─Mozart-European-Composers │ ├─01-symphony.mp3 │ └─03-symphony.mp3 │ ├─Bach-7 │ └─Bach │ ├─02-symphony.ogg │ └─04-concerto.wav │ │ └─Vivaldi-2 └─Vivaldi-Not-The-Browser ├─01-track.m4a └─02-solo.mp4 ================================================= ◘ AFTER ◘ Classical ├─Mozart-5 │ ├─01-symphony.mp3 │ └─03-symphony.mp3 │ ├─Bach-7 │ ├─02-symphony.ogg │ └─04-concerto.wav │ └─Vivaldi-2 ├─01-track.m4a └─02-solo.mp4
Notes:
- Base-folder could be called any folder, e.g. Classical, Rock, etc.
(so, ideally, I would run the Powershell script from inside the base-folder, where all the sub-folders are)
- Folder depth could be 1 or many levels deep
( 99.9% of the time, it will be 2-3 levels deep, i.e.
Root - Music
1st - _Classical_
2nd - Mozart-5
3rd - Mozart-European-Composers
1st - _Indian Classical_
2nd - Ravi
3rd - Ravi Masterpieces
2nd - Zakir
3rd - Zakir-Solo-Piece
)