SImple Move Script

Not sure if this is the correct ‘category’ for this, so if not, I apologise.

I’ve very recently made the switch from Sickbeard to Sonarr, and am loving it so far.One small thing, however, is that in Sickbeard, I had a simple customer .bat file as a post processing script (that would run after all renaming and cataloguing etc) was done.

This script would simply copy the file that Sickbeard had just finished post processing, to E:\Current TV, so that my wife could see what was available to watch.

The extra script I (within a .bat file) used was:
echo n|xcopy %1 “E:\Current TV”

Now that Custom Scripts are added into the main branch of Sonarr (I install on windows 10 via the .exe package), I’m hoping someone can provide a very basic script that will do the same thing?

for the life of me, I can’t get the current one to work. When it runs, I get the following error in the log file:

"EpisodeFileMovingService	Unable to set last write time: The process cannot access the file 'I:\TV Shows P-S\South Park' because it is being used by another process"

My current config is as follows (Full Path is **\Script\Test.bat - with Test.bat being the script being run):

if /i "%Sonarr_EventType%"=="Download" (
   echo n|xcopy "%Sonarr_EpisodeFile_Path%" "E:\Current TV"
)

Something like this? Use at own risk, I am not responsible, etc etc etc…

Wiki for custom postprocessing scripts (link to PHP example at the bottom): https://github.com/Sonarr/Sonarr/wiki/Custom-Post-Processing-Scripts
Relevant Sonarr code: https://github.com/Sonarr/Sonarr/blob/develop/src/NzbDrone.Core/Notifications/CustomScript/CustomScriptService.cs

1 Like

outstanding, exactly what I was after…

not really a coder, so kind of had no idea as soon as I realised it would be more complex than the old Sickbeard version.

And now, Sonarr is perfect for me!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.