Page 1 of 1

"File not found: " error when running the cmdline script

Posted: 12 Nov 2015, 00:59
by Mav986
I keep receiving the error "File not found: /my/path/to/input" when I try to test run my script in windows cmdline

Cmdline log
C:\Users\MYNAME\Desktop>autosort.bat

C:\Users\MYNAME\Desktop>filebot -script fn:amc --output "Z:/Downloads" --log-file amc.log --action test -non-strict "Z:/Unsorted" --def excludeList=Z:/amc.txt

Locking C:\Users\MYNAME\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Thu Nov 12 08:56:44 AWST 2015]
Parameter: excludeList = Z:/amc.txt
Argument: Z:\Unsorted
File not found: Z:\Unsorted
Failure (┬░_┬░)
Log for the same operation:
Run script [fn:amc] at [Thu Nov 12 08:56:44 AWST 2015]
Parameter: excludeList = Z:/amc.txt
Argument: Z:\Unsorted
File not found: Z:\Unsorted
Failure (°_°)
I simply copied the Cmdline script posted in the OP of viewtopic.php?f=4&t=215, and changed the amc, input, and output paths to my own.

The Z: drive is NAS that I have mapped to [obviously] Z:. I can access it just fine via explorer, so it's not a network connection issue. The unsorted folder exists, so it's not that either.

Re: "File not found: " error when running the cmdline script

Posted: 12 Nov 2015, 10:10
by rednoah
Looks like it's failing here:
https://github.com/filebot/scripts/blob ... roovy#L121

It's definitely some sort of permission / network share issue. FileBot asks Windows if "Z:\Unsorted" exists, and Windows says no.

Re: "File not found: " error when running the cmdline script

Posted: 12 Nov 2015, 12:48
by Mav986
I'm not sure how it could be permissions. UAC is disabled on both accounts, and the NAS security is set to 'full control' for 'everyone'. None of my settings on the NAS changed between 2 days ago and today, but I did a format on this PC(PC1) and forgot to backup my modified version of the script, so am having to start again.

Any idea what could be interfering with the script? UAC was my first guess when I came across the problem, but that has since been disabled.

It's definitely something to do with the connection to the NAS. When I change Z:/Unsorted to C:/TestFolder it works just fine, but is then unable to create amc.txt on the Z: drive. I double checked permissions and it's definitely set to full control for everyone.

Re: "File not found: " error when running the cmdline script

Posted: 12 Nov 2015, 16:24
by rednoah
So if mounted drive doesn't work, have you tried UNC paths instead?


Use FileBot Groovy Pad to run a few lines of code:

Code: Select all

def f = 'Z:/Unsorted' as File
println f
println f.exists()
println f.isFile()
println f.isDirectory()
println f.listFiles()
println f.canRead()
println f.canWrite()
And try a few things, like using UNC paths instead:

Code: Select all

def f = /\\server\share/ as File

This is not a FileBot-specific problem. Possibly, a Java issue, but it's most likely it's a generic Windows issue that'll affect any (3rd party) application.

Re: "File not found: " error when running the cmdline script

Posted: 12 Nov 2015, 23:19
by Mav986
Interesting, the UNC absolute path worked just fine. However now it throws another permissions error when it tries to create the amc.txt file. Do you have any idea how I can fix these permissions issues? This probably isn't going to be the only time they cause an issue :\

I get this error thrown in the amc.log file when I use the UNC path in the script:
FileSystemException: Z:\TV Shows\2 Broke Girls\Season 04: Unable to determine if root directory exists
Tried remapping the drive to a different drive letter, no bueno.

Final Edit: I gave up on network permissions. Moved the script and utorrent over to the HTPC, updated utorrent to latest version so I could use the utorrent web remote to manage my torrents, and changed the script to point to the now hard-connected HDD. Works like a charm.

Re: "File not found: " error when running the cmdline script

Posted: 13 Nov 2015, 09:00
by rednoah
Nice! Running on the NAS with full automation is the best solution anyways. ;)