Page 1 of 1
Passing argumets to -rename fn in PowerShell
Posted: 10 May 2019, 20:32
by stephen147

Tried to pass the F variable to the argument of the rename fn but no luck. Anyone get this to work?
Reason for this is I want more than one rename action so just having the one variable to change would be handy.
MY GO AT IT:
Code: Select all
$F = ('--file-filter "f.video || ext == /nfo/"' | Out-String)
$movieFolderPath = "Z:\Movies & TV\_Newly DL'd"
filebot -rename -r "$movieFolderPath" -non-strict --format "{n} - {y}" "$F" --db TheMovieDB --action test --log info
Re: Passing argumets to -rename fn in PowerShell
Posted: 10 May 2019, 21:50
by stephen147
Got it to work:
Code: Select all
$filterFiles = ('"f.video || ext == /nfo/ || ext == /srt/"')
$movieFolderPath = """Z:\Movies & TV\_Newly DL'd\_To Process"""
filebot -rename -r $movieFolderPath -non-strict --format "{n} - {y}" --db TheMovieDB --file-filter $filterFiles
Cannot get the variable to contain the switch
but I can live with this.
This doesn't work:
Code: Select all
$filterFiles = ('--file-filter "f.video || ext == /nfo/ || ext == /srt/"')
Re: Passing argumets to -rename fn in PowerShell
Posted: 11 May 2019, 04:10
by rednoah
You can use the
@file syntax for reading command-line arguments from external text files.
e.g.
Code: Select all
filebot @C:/rename.args @C:/format.args @C:/filter.args @C:/input-folders.args
Re: Passing argumets to -rename fn in PowerShell
Posted: 11 May 2019, 08:27
by stephen147
rednoah wrote: ↑11 May 2019, 04:10
You can use the
@file syntax for reading command-line arguments from external text files.
e.g.
Code: Select all
filebot @C:/rename.args @C:/format.args @C:/filter.args @C:/input-folders.args
Thanks.
