0

This is similar to PowerShell Flatten Directory Structure , but different.

I have a bunch of folders from ripping albums of the form artist/title/<disc number (an int)>. This is good if there's more than one disc, but if not, you have artist/title/1/, where it'd make more sense to move the contents of 1 up and delete the now empty 1 directory.

This would be only for the case where 1 is the only sub-dir; and note that there may be more multiple titles under artist.

Any suggestions on doing this in Powershell, or another way without going to Python?

schodge
  • 891
  • 2
  • 16
  • 29
  • Powersshell is a good scripting language to achieve this (iterating through `Get-ChildItem | ForEach {...` is indeed a good start point) but do not expect that someone is going to write this for you based on the requirements you described. You will need to start writing it your self and if you run in any issues you might post them here. – iRon Apr 03 '18 at 06:45
  • You make a very good point, that question was too broad with not enough work on my end first. Will vote to close. – schodge Apr 06 '18 at 03:35

0 Answers0