Delete folder from source after moving the file

jpborjas asked for this feature 8 months ago — 11 comments

jpborjas commented 8 months ago

When SABnzbd finishes downloading a movie, it puts it in a folder. When Radarr moves that movie its final destination, it should remove the folder, but it isn't.

| fedoranimus commented 8 months ago

Does the SAB-created folder still have contents in it? Radarr will delete the previous folder if it's empty, but not if there are files left-over.

| vortexrap commented 8 months ago

i would be very careful with this. Depending on the situation, some movies are downloaded without a folder. Radarr needs to be able to handle those situations or else you run the risk of deleting the parent/root folder.

| dcplaya commented 8 months ago

Happens to me, crap files are left over like samples, idx, nfo, ect files. I always have to delete folder manually.

| linds1234 commented 8 months ago

I don't think this feature is needed from the radarr side of things. I use Sabnzbd to download, and include these extensions below in the cleanup list, radarr then deletes the folder no problem.

.nfo, .sfv, .nzb, .srr, .info, .idx, .txt, .com, .db, .md5, .par2, .png, .1, .jpg, .jpeg, .url, .lnk, .html, .ini, .bat, .com, .exe, .scr, .sample

| fryfrog commented 7 months ago

I agree, this seems like something the downloader should handle.

| mikeschutz commented 6 months ago

I like the idea of the downloader being nothing more than a downloader. Download the NZB and pass it back to whatever program/service requested the file. Let the program (Radarr in this case) grab the video file and dispose of the rest.

sammy2142 commented 5 months ago

Probably worth mentioning this currently works with other download clients (utorrent etc). Though I do believe utorrent has an api call to delete the torrent and downloaded files.

Vildibuks commented 5 months ago

i created a simple bat file and run it every night to fix this. (i use torrent+seedbox+resilio) if you like me use resilio just set the sync folder and all subfolder/files to hidden. use this script (change D:\Movie\ to your folder remeber to keep the * and . after):

del D:\Movie* /S /Q FOR /D %%p IN ("D:\Movie*.*") DO rmdir "%%p" /s /q

Vildibuks commented 5 months ago

woops sry. there need to be a linebreak like this:

del D:\Movie* /S /Q FOR /D %%p IN ("D:\Movie*.*") DO rmdir "%%p" /s /q

Vildibuks commented 5 months ago

After /Q and before FOR

del D:\Movie* /S /Q

FOR /D %%p IN ("D:\Movie*.*") DO rmdir "%%p" /s /q

Join the discussion!

with GitHub to comment