Page 1 of 1
-bash: !_SORTED: event not found
Posted: 15 Apr 2021, 16:28
by GreenLantern81
Hi!
Im trying to run this command. I get the following error "
" The folder "!_SORTED TV" does exist even thou i want Filebot to create it if it is missing. But why is this not working? Im running this on my seedbox using SSH.
Code: Select all
filebot -rename -r --db TheMovieDB::TV -non-strict --def minAgeDays=3 f.name =~ /[.](avi|mkv|mp4|srt|sub|idx|nfo)$/. /home/xxx/files/Downloaded/SORT-TV/ --output "/home/xxx/files/Downloaded/other01/!_SORTED TV" --format "{az}/{ny}/Season {s00}/{fn}"
Im using FileBot 4.9.3 (r8340)
Thank you!
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 02:32
by rednoah
! has special meaning to the bash interpreter:
https://serverfault.com/a/208266/341621
YES:
Code: Select all
echo '!hello $world'
!hello $world
NO:
Code: Select all
echo "!hello $world"
zsh: event not found: hello
Use the
@file syntax for reading command-line arguments from external text files.
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 04:06
by GreenLantern81
Ooh so simple, thanks!
Im learning everyday how powerful filebot is!!
I have some troubles with tv series to thou...:
Code: Select all
filebot -rename -r --db TheMovieDB::TV -non-strict --def minAgeDays=6 f.name =~ "/[.](avi|mkv|mp4|srt|sub|idx|nfo)$/." /home/xxx/files/Downloaded/SORT-TV/ --output '/home/xxx/files/Downloaded/other01/!_SORTED TV' --format "{az}/{ny}/Season {s00}/{fn}"
I want to wait 6 days so i can seed and i only want to move video files, nfo's and subtitles. i cant get f.name to work and also minAage definition.
I have manually change the season folder and added video info and sub info like this: Season 01 (1080p,web-dl,eng-sub). Can Dilebot make this for me?
Thank you for your support!
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 04:19
by rednoah
--def minAgeDays is a script option, and has no effect on
-rename calls or any other script call that doesn't use the
minAgeDays as an input variable.
The
--file-filter option may work for you though:
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 04:52
by GreenLantern81
Thanks!
Im trying to define what files to precess and have played with this:
Code: Select all
--def ignore="[.](r[0-9]+|sample)$/."
I get
Code: Select all
* This is not a -script call. The script parameter --def ignore has no effect.
Is there a simple way to ignore rar ans sample files?
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 04:58
by rednoah
--def ignore is a script option, i.e. an option for the
amc script.
You'll want to use the
--file-filter option.
e.g. include only video files that are older than 7 days:
Code: Select all
--file-filter "f.video && age > 7"
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 04:59
by GreenLantern81
Yes i have seen this example, but will this move subtitles as well?
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 05:01
by rednoah
e.g. include only video files or subtitle files that are older than 7 days:
Code: Select all
--file-filter "(f.video || f.subtitle) && age > 7"
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 05:01
by GreenLantern81
THANK YOU! Perfect!
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 05:59
by GreenLantern81
...one liiiitle tiny problem left...
im running:
"{az}/{ny}/Season {s00} ({lang},{textLanguages},{vf},{hd},{vs})/{fn}
Im trying lang and textlanguage to see the differences. The problem im facing is multiplied season folders.
Is filebot that amazing that it can make the same output on all season folders or is there a much more simple way
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 06:15
by rednoah
{lang} (subtitle language suffix) and
{textLanguages} (embedded subtitle language) may vary by file so you'll want to avoid using this piece of information in the folder path.
EDIT:
The
{model} binding can help you create a constant file path for a given set of matches, but you'll first want to define for yourself what
"same output on all season folders" should be for all possible match models:
viewtopic.php?t=9814
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 06:19
by GreenLantern81
Ok. But can i add if there are subtitles in swedish add that to the season folder?
hmmm. And i see now that the subtitles didnt get moved.
Code: Select all
filebot -rename -r --db TheMovieDB::TV -non-strict --file-filter "(f.video || f.subtitle) && age > 7" /home/xxx/files/Downloaded/SORT-TV/ --output '/home/xxx/files/Downloaded/other01/!_SORTED TV' --format "{az}/{ny}/Season {s00} ({lang},{textLanguages},{vf},{hd},{vs})/{fn}"
They are srt files.
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 06:21
by rednoah
What does the console output say?
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 06:25
by GreenLantern81
Nothin about any subtitles:
Rename episodes using [TheMovieDB] with [Airdate]
Lookup via [Better Things]
Fetching episode data for [Better Things]
[MOVE] from [/home/xxx/files/Downloaded/SORT-TV/Better.Things.S03.NORDiC.1080p.WEB.H264-EGEN/Better.Things.S03E01.NORDiC.1080p.WEB.H264-EGEN.mkv] to [/home/xxx/files/Downloaded/other01/!_SORTED TV/B/Better Things (2016)/Season 03 (,[dan, nor, swe, fin],1080p,HD,WEB-DL)/Better.Things.S03E01.NORDiC.1080p.WEB.H264-EGEN.mkv]
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 08:53
by GreenLantern81
Am i missing something?
Ive tried different combos but no success :/
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 08:59
by rednoah
What does
{age} say for each of your subtitle files?
Code: Select all
filebot -mediainfo -r /input --format "{age} | {f.video} | {f.subtitle} | {f}"
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 09:07
by GreenLantern81
xxx@Debian-109-buster-64-minimal:~$
Code: Select all
filebot -mediainfo -r /home/xxx/files/Downloaded/SORT-TV/ --format "{age} | {f.video} | {f.subtitle} | {f}" --output '/home/xxx/files/Downloaded/other01/!_SORTED TV' --format "{az}/{ny}/Season {s00} ({vf},{hd},{vs})/{fn}"
Code: Select all
//Season (,,WEB-DL)/Better.Things.S01.NORDiC.1080p.WEB.H264-EGEN
//Season (,,WEB-DL)/Better.Things.S02.NORDiC.1080p.WEB.H264-EGEN
//Season (1080p,HD,WEB-DL)/Better.Things.S04E01.NORDiC.1080p.WEB.H264-EGEN.da
//Season (1080p,HD,WEB-DL)/Better.Things.S04E01.NORDiC.1080p.WEB.H264-EGEN.fi
//Season (1080p,HD,WEB-DL)/Better.Things.S04E01.NORDiC.1080p.WEB.H264-EGEN
//Season (1080p,HD,WEB-DL)/Better.Things.S04E01.NORDiC.1080p.WEB.H264-EGEN.no
//Season (1080p,HD,WEB-DL)/Better.Things.S04E01.NORDiC.1080p.WEB.H264-EGEN.sv
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 09:08
by GreenLantern81
the:
Code: Select all
//Season (,,WEB-DL)/Better.Things.S01.NORDiC.1080p.WEB.H264-EGEN
//Season (,,WEB-DL)/Better.Things.S02.NORDiC.1080p.WEB.H264-EGEN
is nfo's
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 09:48
by rednoah
Just run this:
Code: Select all
filebot -mediainfo -r /home/xxx/files/Downloaded/SORT-TV --format "{age} | {f.video} | {f.subtitle} | {f}"
If you add additional options then you may override the preceding ones.
EDIT:
We run this command so we can see each condition of our
--file-filter expression so that we can find out why our subtitle files are excluded:
Code: Select all
$ filebot -mediainfo -r . --format "{age} | {f.video} | {f.subtitle} | {f}"
638 | true | false | .../iZombie - S05E11.mkv
638 | false | true | .../iZombie - S05E11.srt
The most likely explanation is that the subtitle files were created after the video files, thus
age > 7 may not necessarily hold true for your subtitle files.
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 10:04
by GreenLantern81
| false | false | /home/xxx/files/Downloaded/SORT-TV/Better.Things.S01.NORDiC.1080p.WEB.H264-EGEN/Better.Things.S01.NORDiC.1080p.WEB.H264-EGEN.nfo
| false | false | /home/xxx/files/Downloaded/SORT-TV/Better.Things.S02.NORDiC.1080p.WEB.H264-EGEN/Better.Things.S02.NORDiC.1080p.WEB.H264-EGEN.nfo
| false | true | /home/xxx/files/Downloaded/SORT-TV/Better.Things.S04E01.NORDiC.1080p.WEB.H264-EGEN.da.srt
| false | true | /home/xxx/files/Downloaded/SORT-TV/Better.Things.S04E01.NORDiC.1080p.WEB.H264-EGEN.fi.srt
| true | false | /home/xxx/files/Downloaded/SORT-TV/Better.Things.S04E01.NORDiC.1080p.WEB.H264-EGEN.mkv
| false | true | /home/xxx/files/Downloaded/SORT-TV/Better.Things.S04E01.NORDiC.1080p.WEB.H264-EGEN.no.srt
| false | true | /home/xxx/files/Downloaded/SORT-TV/Better.Things.S04E01.NORDiC.1080p.WEB.H264-EGEN.sv.srt
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 10:06
by rednoah
age is undefined for all your files? Strange. IDK.
EDIT:
If you've previously renamed these files, then
{age} will be based on the Movie / Episode age and not the file age.
In any case, you can test like this:
* Include all files:
* Include video and subtitle files:
Code: Select all
--file-filter "f.video || f.subtitle"
* Include video and subtitle files of any age:
Code: Select all
--file-filter "(f.video || f.subtitle) && age >= 0"
How old
(in days) are your video / subtitle files?
Adjust
age >= 0 accordingly.
Re: -bash: !_SORTED: event not found
Posted: 16 Apr 2021, 10:10
by GreenLantern81
Haaa That did it!
It now works!
Once again, thanks!!