[PP-Script] EasySort - move files without renaming

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
Post Reply
hugbug
Developer & Admin
Posts: 7072
Joined: 09 Sep 2008, 11:58
Location: Germany

[PP-Script] EasySort - move files without renaming

Post by hugbug » 11 Oct 2015, 12:55

Many have asked how to put downloaded files into destination directory without creating of subdirectory with nzb-name. This is usually done with VideoSort script. But sometimes it's an overkill (if file renaming isn't needed) and not very intuitive if non-video files must be moved.

EasySort is based on VideoSort and is a simple version of it. It can't rename, can not distinguish between series and movies but is easier to setup and in particular more useful for non-video files.

You specify a list of file extensions to process and destination directory (which can be set to ".." to simply get rid of subdirectory). Being based on VideoSort this script includes two handy overwrite modes: simple overwrite and appending suffix (2, 3, etc.) to file name if a file with the same name already exists. It can also cleanup after the files are moved by deleting the original directory with all remaining files.

Info about pp-script Tip: if you need multiple destinations depending on file extensions make a copy of the script under a different name. Now you have two scripts which may have different settings and can be assigned to different categories. If you use two scripts for the same nzb make sure the fist script doesn't cleanup.
Attachments
EasySort.py
(10.2 KiB) Downloaded 672 times

juliem
Posts: 6
Joined: 27 Feb 2016, 07:42

Re: [PP-Script] EasySort - move files without renaming

Post by juliem » 29 Oct 2016, 13:20

Hi Hugbug

I was trying your script and have a little question around the DestDir options - I am just learning Linux so I know its a stupid question to have :)

I have the downloads going to a folder called Downloads-Completed-Category, at the same level as the download directory I have links to the network drives, so I thought I would need to go up a few levels

I entered ../../../ to get it to the right level but it just fails constantly with permission errors (EasySort: [Errno 13] Permission denied) if I look at the folder it's created the folder under the category level and everything looks fine it's just not doing it at the right level.

I turned on the verbose logging but I can't see anything

Any idea's what I have done wrong?

hugbug
Developer & Admin
Posts: 7072
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] EasySort - move files without renaming

Post by hugbug » 29 Oct 2016, 15:12

Hard to tell. The approach should actually work if the path is correct and permissions are OK.
Does nzbget run under the user account which has access to the path?

juliem
Posts: 6
Joined: 27 Feb 2016, 07:42

Re: [PP-Script] EasySort - move files without renaming

Post by juliem » 06 Nov 2016, 11:55

hi sorry for the late respones, I went to look at this permission side today and tried a download to test everything and get the errors and it worked fine so I have no clue why it never worked last week.

Appreciate the help

galronn
Posts: 9
Joined: 30 Jan 2018, 23:06

Re: [PP-Script] EasySort - move files without renaming

Post by galronn » 31 Jan 2018, 20:58

@hugbug, thanks very much for your work on this and all your projects.

Can I ask for a enhancement request? :D

Under Cleanup, Delete download directory after renaming. How about if directory is empty after move of file, delete the directory else directory remains untouched?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest