Page 1 of 1

cli - include user/pass information for network location

Posted: 06 Oct 2015, 01:48
by PeteTSM
Hi,

My search fu is weak and I was not able to find an existing answer to this question. Apologies if I missed it.

I am trying to use the following cli command to copy a file to a windows network location on my NAS. My NAS requires user/pass authentication, however, and I get the below error in the log. Is there a way to include user/pass information on the command line?

Code: Select all

filebot.exe -script fn:amc --output \\SOLACENAS\MediaNAS\Videos --log-file amc.log --action copy -non-strict D:\Encode\ATTACK_OF_THE_CLONES --conflict skip --def plex=127.0.0.1:zXcjJBpdopp8ykTW25Po --def reportError=y --def "seriesFormat=TV Shows/{n}/{n} - {s00e00} - {t}" "animeFormat=TV Shows/{n}/{n} - {s00e00} - {t}" "movieFormat=Movies/{n} ({y})"

Code: Select all

Run script [fn:amc] at [Mon Oct 05 15:37:03 PDT 2015]
Parameter: plex = 127.0.0.1:zXcjJBpdopp8ykTW25Po
Parameter: reportError = y
Parameter: seriesFormat = TV Shows/{n}/{n} - {s00e00} - {t}
Parameter: animeFormat = TV Shows/{n}/{n} - {s00e00} - {t}
Parameter: movieFormat = Movies/{n} ({y})
Argument: D:\Encode\ATTACK_OF_THE_CLONES
Input: D:\Encode\ATTACK_OF_THE_CLONES\ATTACK_OF_THE_CLONES.mkv
ATTACK_OF_THE_CLONES.mkv [series: null, movie: Star Wars: Episode II - Attack of the Clones (2002)]
Group: [tvs:null, mov:star wars episode ii attack of the clones 2002, anime:null] => [ATTACK_OF_THE_CLONES.mkv]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [D:\Encode\ATTACK_OF_THE_CLONES\ATTACK_OF_THE_CLONES.mkv]
Stripping invalid characters from new path: Movies/Star Wars: Episode II - Attack of the Clones (2002)
[COPY] Rename [D:\Encode\ATTACK_OF_THE_CLONES\ATTACK_OF_THE_CLONES.mkv] to [\\SOLACENAS\MediaNAS\Videos\Movies\Star Wars Episode II - Attack of the Clones (2002).mkv]
[COPY] Failed to rename [D:\Encode\ATTACK_OF_THE_CLONES\ATTACK_OF_THE_CLONES.mkv]
FileSystemException: \\SOLACENAS\MediaNAS\Videos: Logon failure: unknown user name or bad password.

Finished without processing any files
Failure (°_°)
Thanks in advance for any help!

Re: cli - include user/pass information for network location

Posted: 06 Oct 2015, 06:36
by rednoah
I've never seen that issue. Adding Windows credentials is not supported, but it shouldn't be necessary in the first place. Have you tried mounting it as network drive?

Looks like a generic Windows file sharing issue, Google will help.

Re: cli - include user/pass information for network location

Posted: 07 Oct 2015, 22:08
by PeteTSM
I figured this out, posting the answer here in the hopes that it will help someone else out in the future.

The issue was that I was running the script as Administrator on Windows (some other tools in the script required me to run it as admin). Running CMD as an administrator creates a second security context, so even if your network mapped drive is accessible under your normal user account, you have to map the drive again as the administrator. I used the "net use" command line tool to map the drive as an admin cmd.

Some links for reference:
https://social.technet.microsoft.com/Fo ... and-prompt
http://www.howtogeek.com/118452/how-to- ... n-windows/