Page 1 of 1

How do I use the filebot-watcher.ps1 script with a custom @file for command-line arguments?

Posted: 15 Dec 2022, 22:04
by Wirly
Thanks a bunch for these great scripts rednoah!

For anyone using the windows script, if you have all your AMC options saved in the @file syntax, you might want to edit line 17 of the filebot-watcher.ps1 script to remove unwanted options. Change Line 17 to...

Code: Select all

	& filebot @global:options | Write-Host
Since all your options are in the @file, you can then run the script and simply pass the options file...

Code: Select all

C:\Tools\filebot-watcher.ps1 "X:\path\to\monitored_folder" "@A:\path\to\amc-options.txt"
Thanks again rednoah, works great and is much cleaner than my current approach of blindly running the script every 3 minutes!

Re: [DOCS] How do I monitor a folder and call filebot on newly added files?

Posted: 16 Dec 2022, 03:39
by rednoah
Wirly wrote: 15 Dec 2022, 22:04 For anyone using the windows script, if you have all your AMC options saved in the @file syntax, you might want to edit line 17 of the filebot-watcher.ps1 script to remove unwanted options. Change Line 17 to...

Code: Select all

	& filebot @global:options | Write-Host
Why would you want to do that though? You can just specify the options you prefer in your @file. You can overwrite a previously specified option, by specifying it again with a different option value. So what you're doing works by default, you just might have to explicitly enable / disable some options in your @file instead of omitting them.

e.g. use --action move

Code: Select all

.\filebot-watcher.ps1 X:\Input --output X:\Output --action move
e.g. --action move is used because it is the last occurrence of that option:

Code: Select all

filebot -script fn:amc --action duplicate ... --action move