[Bash] Run command for every new file downloaded
Posted: June 2nd, 2019, 9:40 am
Hello,
I cannot find the solution to what I believe is a "simple problem":
I download my movies into a Linux folder: /media/movies
I do not use any subfolder. i.e. all MKV files are under /media/movies
Everytime I download a new movie, I want to run the command "touch" on the file download (and only this file, not on the other files of the /media/movies folder"
I understand that the parameters available to the post-processing scripts are $1, $2, $3
1 The final directory of the job (full path)
2 The original name of the NZB file
3 Clean version of the job name (no path info and ".nzb" removed)
How do I create a script that will do "touch /media/movies/filename.mkv" on each new file downloaded?
Thanks for your help.
I cannot find the solution to what I believe is a "simple problem":
I download my movies into a Linux folder: /media/movies
I do not use any subfolder. i.e. all MKV files are under /media/movies
Everytime I download a new movie, I want to run the command "touch" on the file download (and only this file, not on the other files of the /media/movies folder"
I understand that the parameters available to the post-processing scripts are $1, $2, $3
1 The final directory of the job (full path)
2 The original name of the NZB file
3 Clean version of the job name (no path info and ".nzb" removed)
How do I create a script that will do "touch /media/movies/filename.mkv" on each new file downloaded?
Thanks for your help.