I'm trying to mass rename Southpark, about 30% of the files are stored in their own folder eg:
-rw-rw-rw- 1 debian-transmission debian-transmission 84242318 Sep 25 15:10 South Park - 18x01 - Go Fund Yourself.mp4
-rw-rw-rw- 1 debian-transmission debian-transmission 98974631 Oct 2 17:00 South Park - 18x02 - Gluten Free Ebola.mp4
-rw-rw-rw- 1 debian-transmission debian-transmission 80916289 Oct 9 14:55 South Park - 18x03 - The Cissy.mp4
-rw-rw-rw- 1 debian-transmission debian-transmission 103685920 Oct 16 15:27 South Park - 18x04 - Handicar.mp4
-rw-rw-rw- 1 debian-transmission debian-transmission 296853841 Nov 13 18:43 South Park - 18x07 - Grounded Vindaloop.mkv
-rw-rw-rw- 1 debian-transmission debian-transmission 338422799 Nov 23 17:33 South Park - 18x08 - Cock Magic.mkv
drwxrwxrwx 2 debian-transmission debian-transmission 5 Jan 8 11:12 South.Park.S18E05.720p.HDTV.x264-KILLERS[rarbg]
drwxrwxrwx 3 debian-transmission debian-transmission 6 Jan 8 11:12 South.Park.S18E06.720p.HDTV.X264-DIMENSION[rarbg]
drwxrwxrwx 2 debian-transmission debian-transmission 5 Jan 8 11:12 South.Park.S18E09.HDTV.x264-KILLERS[rarbg]
drwxrwxrwx 2 debian-transmission debian-transmission 5 Jan 8 11:12 South.Park.S18E10.HDTV.x264-KILLERS[rarbg]
Is there an easy way to do this?
move single file from folder to parent, then delete folder?
Re: move single file from folder to parent, then delete fold
Move into new structure & delete left-behind folders.
Re: move single file from folder to parent, then delete fold
Hmm I can't seem to find a guide for this, command line only.rednoah wrote:Move into new structure & delete left-behind folders.
Re: move single file from folder to parent, then delete fold
To move files into a new structure means specifying an absolute path as format. Whatever remains in the original location you can easily delete yourself by deleting the parent folder.
Re: move single file from folder to parent, then delete fold
1 up = {file.parentFile}/{fn}
2 up = {file.parentFile.parentFile}/{fn}
Grab name of the folder 1 steps up = {file.parentFile.name}
Grab name of the folder 2 steps up = {file.parentFile.parentFile.name}
2 up = {file.parentFile.parentFile}/{fn}
Grab name of the folder 1 steps up = {file.parentFile.name}
Grab name of the folder 2 steps up = {file.parentFile.parentFile.name}
Re: move single file from folder to parent, then delete fold
What he said. But using {folder} or {folder.parent} or {folder.dir} etc will make things slightly less verbose.