Page 1 of 1

Creating folders issue

Posted: 29 Jan 2017, 23:30
by wimwamspam
Hey everyone.

I have been trying to get filebot to create folders in a different location than the files are in.

The plan is to have filebot scan the files in

Code: Select all

/torrents/ACD/completed/
and then create the correct folders in another location:

Code: Select all

/torrents/ACD/Couchpotato_Complete/<show name>/<season>/<episode.mkv>
with the naming scheme

Code: Select all

{n} [{sdhd}]/Season {s} [{sdhd}]/{n.replaceTrailingBrackets()} {s00e00} {t.replace(':', '-').replaceAll(/^Day [0-9]/)} [{vf}]

So the command I have wrote out is:

Code: Select all

filebot -script fn:renall "torrents/ACD/completed" -non-strict --format "/torrents/ACD/Couchpotato_Complete/{n} [{sdhd}]/Season {s} [{sdhd}]/{n.replaceTrailingBrackets()} {s00e00} {t.replace(':', '-').replaceAll(/^Day [0-9]/)} [{vf}]"

I am doing this through SSH to my Ubuntu seedbox and getting this error:

[MOVE] Rename [/home/wut/torrents/ACD/completed/The.Strain.S03.1080p.WEB-DL.DD5.1.H.264-NTb/The Strain - 3x01 - New York Strong.mkv] to [/torrents/ACD/Couchpotato_Complete/The Strain [HD]/Season 3 [HD]/The Strain S03E01 New York Strong [1080p].mkv]
[MOVE] Failed to rename [/home/wut/torrents/ACD/completed/The.Strain.S03.1080p.WEB-DL.DD5.1.H.264-NTb/The Strain - 3x01 - New York Strong.mkv]
/torrents/ACD/Couchpotato_Complete/The Strain [HD]: Not a directory
So it seems it is having issues creating folders? Has anyone else had this issue?


I tried making a log file by sending this command

Code: Select all

filebot --log-file /torrents/scripts/logs/log.txt
I receive this error:
Error during startup: java.io.IOException: Not a directory
java.io.IOException: Not a directory
at net.filebot.Main.initializeLogging(Main.java:407)
at net.filebot.Main.main(Main.java:109)
I have 64bit java installed on my 64bit machine and sudo access etc.

Filebot runs and names files perfectly well when there is not a specific folder output - I had an issue of it creating the <show name>/<season>/<file.mkv> inside the original folder so thought i'd try this different approach.

Appreciate any help. :)

Re: Creating folders issue

Posted: 30 Jan 2017, 06:06
by rednoah
Are you sure that /torrents/scripts/logs is a folder that exists and that you have rw permissions for?

What does ls say?

Code: Select all

ls -l /torrents/scripts/logs
Note that /home/wut/torrents is NOT the same as /torrents. You have permission for your home folder. You do not have permission for the filesystem root.

Re: Creating folders issue

Posted: 30 Jan 2017, 13:23
by wimwamspam
Thank you for your reply. :)

When I type

Code: Select all

ls -l /torrents/scripts/logs
I receive
ls: cannot access '/torrents/scripts/logs': Not a directory
And when I type

Code: Select all

ls -l torrents/scripts/logs
I get
-rw-rw-r-- 1 wut wut 4740 Jan 30 13:06 torrents/scripts/logs
Alright so the first slash was a mistake, now I send the command without it:

Code: Select all

filebot --log-file torrents/scripts/logs/log.txt
And this is the response - not sure if that was successful as there was no log.txt file created in the scripts/logs folder after running the original rename command.
filebot --log-file torrents/scripts/logs/log.txt
FileBot 4.7.7 (r4678) / OpenJDK Runtime Environment 1.8.0_111 (headless)

--mode [Rename, Subtitles, SFV] or : Open GUI in single panel mode /
[interactive] Enable CLI interactive mode
-rename : Rename media files
--db [TheTVDB, AniDB] or [TheMovieDB] : Database
or [AcoustID, ID3] or [xattr]
--order [Airdate, Absolute, DVD] : Episode order
--action [move, copy, keeplink, : Rename action
symlink, hardlink, reflink, test]
--conflict [skip, override, auto, : Conflict resolution
index, fail]
--filter expression : Filter expression
--format expression : Format expression
-non-strict : Enable advanced matching and more
aggressive guessing
-get-subtitles : Fetch subtitles
--q series/movie title : Force lookup query
--lang 3-letter language code : Language
-check : Create/Check verification files
--output /path : Output path
--encoding [UTF-8, Windows-1252] : Output character encoding
-list : Fetch episode list
-mediainfo : Get media info
-revert : Revert files
-extract : Extract archives
-script [fn:name] or [dev:name] or : Run Groovy script
[/path/to/script.groovy]
--log [all, fine, info, warning] : Log level
--log-file /path/to/log.txt : Log file
--log-lock [yes, no] : Lock log file
-r : Recursively process folders
-clear-cache : Clear cached and temporary data
-clear-prefs : Clear application settings
-unixfs : Do not strip invalid characters from
file paths
-no-xattr : Disable extended attributes
-version : Print version identifier
-help : Print this help message
--def [name=value] : Define script variables

Out of curiosity I ran the original rename command with a removed slash before the output directory /torrents/ACD/Couchpotato_Complete/

Code: Select all

filebot -script fn:renall "torrents/ACD/completed" -non-strict --format "torrents/ACD/Couchpotato_Complete/{n} [{sdhd}]/Season {s} [{sdhd}]/{n.replaceTrailingBrackets()} {s00e00} {t.replace(':', '-').replaceAll(/^Day [0-9]/)} [{vf}]"
And the results were that filebot created the directory torrents/ACD/Couchpotato_Complete/<name>/<season>/<episode.mkv> inside of the original folder torrents/ACD/completed


I appreciate any help. :)

Re: Creating folders issue

Posted: 30 Jan 2017, 13:31
by rednoah
1.
I think you need to learn some basics:
https://en.wikipedia.org/wiki/Path_(computing)#Unix_style

Once you understand the difference between a relative path and an absolute path you'll probably be able to figure it out yourself.


2.
Use the amc script:

Code: Select all

filebot -script fn:amc --output ~/torrents/ACD/Couchpotato_Complete --action hardlink -non-strict ~/torrents/ACD/completed --log-file amc.log --def excludeList=amc.txt

Re: Creating folders issue

Posted: 30 Jan 2017, 13:58
by wimwamspam
Aha! You're correct, I messed up the absolute path. :oops:

In case anyone stumbles upon this thread with the same issue, this is the correct command.

Code: Select all

filebot -script fn:renall "torrents/ACD/completed" -non-strict --format "/home/wut/torrents/ACD/Couchpotato_Complete/{n} [{sdhd}]/Season {s} [{sdhd}]/{n.replaceTrailingBrackets()} {s00e00} {t.replace(':', '-').replaceAll(/^Day [0-9]/)} [{vf}]"
I might give AMC a look at in the near future as it does look really good, but for now this will do.

Thank you for your help! :)