move single file from folder to parent, then delete folder?

Any questions? Need some help?
Post Reply
jeffrey11
Posts: 2
Joined: 08 Jan 2015, 00:28

move single file from folder to parent, then delete folder?

Post by jeffrey11 »

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?
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: move single file from folder to parent, then delete fold

Post by rednoah »

Move into new structure & delete left-behind folders.
:idea: Please read the FAQ and How to Request Help.
jeffrey11
Posts: 2
Joined: 08 Jan 2015, 00:28

Re: move single file from folder to parent, then delete fold

Post by jeffrey11 »

rednoah wrote:Move into new structure & delete left-behind folders.
Hmm I can't seem to find a guide for this, command line only.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: move single file from folder to parent, then delete fold

Post by rednoah »

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.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: move single file from folder to parent, then delete fold

Post by kim »

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}
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: move single file from folder to parent, then delete fold

Post by rednoah »

What he said. But using {folder} or {folder.parent} or {folder.dir} etc will make things slightly less verbose.
:idea: Please read the FAQ and How to Request Help.
Post Reply