[DUPLICATE] Failure: java.nio.file.AccessDeniedException

Any questions? Need some help?
Post Reply
cybirg
Posts: 3
Joined: 29 Oct 2012, 22:43

[DUPLICATE] Failure: java.nio.file.AccessDeniedException

Post by cybirg » 20 Nov 2012, 12:06

Hi,

Is there any way I can make the script copy or move TV shows to a different folder or drive than movies? I have 2x2TB hard drives and because of folder sizes I need to keep movies and tv shows on different drives.

Thanks in advance for any suggestions.

User avatar
rednoah
The Source
Posts: 15783
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Automated Media Center: Different output folders

Post by rednoah » 22 Nov 2012, 13:19

Sure, just edit the script, use an absolute path as format expression (thus --output will be ignored) and it should work right away.
:idea: Please read the FAQ and How to Request Help.

gusman54
Posts: 5
Joined: 04 Oct 2018, 00:05

Re: Automated Media Center: Different output folders

Post by gusman54 » 17 Feb 2019, 01:40

can you post an example of this?
i also have 2 HDDs, one for tv and one for movies....
i suck at this so i dont know what an "absolute path" entails..

my movies folder is- e:/media/movies and
my tv is f:/media/tv shows

i could certainly change the file directory if that makes it easier...

thank you!!!

ill happily donate some addl $ (i bought full version already) for your assistance if needbe!

User avatar
rednoah
The Source
Posts: 15783
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Automated Media Center: Different output folders

Post by rednoah » 17 Feb 2019, 05:44

e.g.

Code: Select all

--def movieFormat="E:/Media/{plex}" seriesFormat="F:/Media/{plex}"
:arrow: viewtopic.php?f=4&t=215



e.g. This is an absolute path. It starts with a drive letter:

Code: Select all

E:/Media/Avatar.mp4

e.g. This is a relative path. It does not start with a drive letter:

Code: Select all

Media/Avatar.mp4
:idea: Please read the FAQ and How to Request Help.

gusman54
Posts: 5
Joined: 04 Oct 2018, 00:05

Re: Automated Media Center: Different output folders

Post by gusman54 » 25 Feb 2019, 23:30

thanks in advance for any advice or suggestions-

I dont know scripting AT ALL, much less how to find my log file within windows 10.

i have scoured the forums for a similar issue (with the script unrar'ing but not renaming+moving the directory, which occurred before i had to use separate HDDs for my various media files).
even when i just had a single HDD using the AMC script, it would simply create a new folder within my finished downloads folder and never move the completed file to the appropriate directory, or create sub folders for various seasons. Im not sure if this is a permissions issue within windows 10,(regarding moving the completed file) as i had no issues when i used the AMC script on Windows 7.

this is what i did(below), the file unrar'd(but didnt move directory or rename properly), and it went to the tvdb, downloaded the series posters and such, but didnt move the unrar'd file to the correct directory.

the completed file stayed in f: downloads,(where my finished dl's live) and the posters/jpegs for the series were put into the F: drive (not into the f:/downloads, or f:/media/tv shows)
this is where the unrar'd file lives now----> F:\Downloads\Modern.Family.S10E15.720p.HDTV.x264-AVS\modern.family.s10e15.720p.hdtv.x264-avs
here is a snip of what the script was doing...

https://imgur.com/a/tWVZalt

the script i was using is below.

Code: Select all

filebot -script fn:amc --output "F:/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def movieFormat="E:/Media" seriesFormat="F:/Media"--def unsorted=y music=y artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"

User avatar
rednoah
The Source
Posts: 15783
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Automated Media Center: Different output folders

Post by rednoah » 26 Feb 2019, 06:31

1.
Here's a tutorial on how command-line arguments work:
viewtopic.php?f=4&t=1899


2.
Here's examples on how to use custom formats with the amc script:
viewtopic.php?f=4&t=215



Solution:

Please read (1) and (2) carefully before copy & pasting the solution.

Code: Select all

filebot -script fn:amc --output "F:/Media" --action duplicate --conflict skip -non-strict --log-file "F:/Media/amc.log" --def movieFormat="E:/Media/{plex}" seriesFormat="F:/Media/{plex}" --def unsorted=y music=y artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
* Store log file to F:/Media/amc.log so we can find it easily.

* Use {plex} in format template, so you don't end up renaming each and every file to just "F:/Media" (a file called Media with no extension in Drive F).

* Added a missing space which screwed up your argument line.
:idea: Please read the FAQ and How to Request Help.

gusman54
Posts: 5
Joined: 04 Oct 2018, 00:05

Re: Automated Media Center: Different output folders

Post by gusman54 » 01 Mar 2019, 00:57

Hi, im about 99% sure this has something to do with win10 permissions, and not your script itself. The script completely shut down when i attempted to use the new directory for the .log file, (the f:/media one you added), and didnt attempt to unrar or do anything. I reverted back to the default log file location from the script (below) and again, it unrars and creates a new folder within itself with the unrar'd file.

I have win10, i have administrator permissions. Ive attempted to remove the "read only" portion of both my source and destination directories, but for some odd reason it always reverts back to "read only", which again seems to be a permissions issue as far as creating and moving folders.

Is there something i need to change in my user account for win10?

I read your suggestions as far as customizing AMC and the nomenclature of the script, but i dont think thats the issue here. Ive googled the various java errors ive gotten, and there isnt a clear suggestion on how to edit permissions to make it work properly.

THANKS AGAIN FOR ALL YOUR HELP AND HARD WORK.


filebot -script fn:amc --output "F:/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def movieFormat="E:/Media/{plex}" seriesFormat="F:/Media/{plex}" --def unsorted=y music=y artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
It just cant seem to move or create any directories, and

Below is the log file from this script:
Run script [fn:amc] at [Tue Feb 26 22:51:30 EST 2019]
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: ut_label =
Parameter: ut_state = 20
Parameter: ut_title = Supernatural.S14E11.720p.HDTV.x264-KILLERS
Parameter: ut_kind = multi
Parameter: ut_file = Sample\sample-supernatural.s14e11.720p.hdtv.x264-killers_s.jpg
Parameter: ut_dir = F:\Downloads\Supernatural.S14E11.720p.HDTV.x264-KILLERS
Read archive [supernatural.s14e11.720p.hdtv.x264-killers.rar] and extract to [F:\Downloads\Supernatural.S14E11.720p.HDTV.x264-KILLERS\supernatural.s14e11.720p.hdtv.x264-killers\Supernatural.S14E11.720p.HDTV.x264-KILLERS]
Extracting files [F:\Downloads\Supernatural.S14E11.720p.HDTV.x264-KILLERS\supernatural.s14e11.720p.hdtv.x264-killers\Supernatural.S14E11.720p.HDTV.x264-KILLERS\Supernatural.S14E11.720p.HDTV.x264-KILLERS.mkv]
Input: F:\Downloads\Supernatural.S14E11.720p.HDTV.x264-KILLERS\supernatural.s14e11.720p.hdtv.x264-killers\Supernatural.S14E11.720p.HDTV.x264-KILLERS\Supernatural.S14E11.720p.HDTV.x264-KILLERS.mkv
Group: [tvs:supernatural] => [Supernatural.S14E11.720p.HDTV.x264-KILLERS.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Supernatural]
Fetching episode data for [Supernatural]
Fetching episode data for [Supernatural the Animation]
Fetching episode data for [True Supernatural]
Fetching episode data for [Supernatural Nazis]
Fetching episode data for [Supernatural Science]
[DUPLICATE] from [F:\Downloads\Supernatural.S14E11.720p.HDTV.x264-KILLERS\supernatural.s14e11.720p.hdtv.x264-killers\Supernatural.S14E11.720p.HDTV.x264-KILLERS\Supernatural.S14E11.720p.HDTV.x264-KILLERS.mkv] to [F:\Media\TV Shows\Supernatural\Season 14\Supernatural - S14E11 - Damaged Goods.mkv]
[DUPLICATE] Failure: java.nio.file.AccessDeniedException: F:\Media\TV Shows\Supernatural
Processed 0 files
AccessDeniedException: F:\Media\TV Shows\Supernatural
Processing 1 unsorted files
[DUPLICATE] from [F:\Downloads\Supernatural.S14E11.720p.HDTV.x264-KILLERS\supernatural.s14e11.720p.hdtv.x264-killers\Supernatural.S14E11.720p.HDTV.x264-KILLERS\Supernatural.S14E11.720p.HDTV.x264-KILLERS.mkv] to [F:\Media\Unsorted\Supernatural.S14E11.720p.HDTV.x264-KILLERS\supernatural.s14e11.720p.hdtv.x264-killers\Supernatural.S14E11.720p.HDTV.x264-KILLERS\Supernatural.S14E11.720p.HDTV.x264-KILLERS.mkv]
[DUPLICATE] Failure: java.nio.file.AccessDeniedException: F:\Media\Unsorted\Supernatural.S14E11.720p.HDTV.x264-KILLERS
Processed 0 files
AccessDeniedException: F:\Media\Unsorted\Supernatural.S14E11.720p.HDTV.x264-KILLERS
Finished without processing any files
Failure (°_°)

User avatar
rednoah
The Source
Posts: 15783
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Automated Media Center: Different output folders

Post by rednoah » 01 Mar 2019, 04:42

Indeed, the script will fail immediately if it can't write the log file.

Windows permissions can be tricky. I have no idea. I can only recommend lots of googling and trial and error. Permissions can be especially tricky for remote drives.
:idea: Please read the FAQ and How to Request Help.

gusman54
Posts: 5
Joined: 04 Oct 2018, 00:05

Re: Automated Media Center: Different output folders

Post by gusman54 » 02 Mar 2019, 20:05

FIXED!!! It was in fact a permissions issue afterall. I stupidly didnt check off to include inherited folders. the phrasing windows uses is somewhat confusing. Leaving this on here in case anyone else runs into a similar issue.

https://imgur.com/a/6eJG3lX

Thank you for all your help and superfast responses. The main reason i upgraded to win10 was because you stopped supporting win7.

TAKE CARE!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests