The process cannot access the file

Any questions? Need some help?
Post Reply
rye381
Posts: 4
Joined: 06 Jul 2013, 17:51

The process cannot access the file

Post by rye381 »

My script seems to work fine except when I change the -action copy to -action move. When I do this, I get the "the process cannot access the file because it is being used by another process. I am a complete noob when it comes to this stuff. Here is my script as well, can someone please help me out. Thanks in advance for the help, I really appreciate it.

Code: Select all

filebot -script fn:amc --output "Z:/" --log-file amc.log --action move --conflict override -non-strict --def music=n subtitles=n artwork=n clean=y --def "seriesFormat=TV Shows/{n}/Season {s}/{n} - {s00e00} - {t}" "movieFormat=Movies/{genres[0]}/{n} ({y})/{n} ({y}) {"CD$pi"}" "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S"
I have also included what it says from the log file:
Parameter: music = n
Parameter: subtitles = n
Parameter: artwork = n
Parameter: clean = y
Parameter: seriesFormat = TV Shows/{n}/Season {s}/{n} - {s00e00} - {t}
Parameter: movieFormat = Movies/{genres[0]}/{n} ({y})/{n} ({y}) {CD$pi}
Parameter: ut_dir = Z:\TV Shows\Perception\Season 2\Perception S02E02 HDTV x264-LOL[ettv]
Parameter: ut_file = perception.202.hdtv-lol.mp4
Parameter: ut_kind = multi
Parameter: ut_title = Perception S02E02 HDTV x264-LOL[ettv]
Parameter: ut_label = ETTV (PirateBay)
Parameter: ut_state = 5
Input: Z:\TV Shows\Perception\Season 2\Perception S02E02 HDTV x264-LOL[ettv]\perception.202.hdtv-lol.mp4
Group: [tvs:Perception] => [perception.202.hdtv-lol.mp4]
Rename episodes using [TheTVDB]
Auto-detected query: [Perception]
Fetching episode data for [Perception]
Jul 02, 2013 8:16:06 PM net.sourceforge.filebot.media.MediaDetection storeMetaInfo
WARNING: Failed to set xattr: java.nio.file.AccessDeniedException: Z:\TV Shows\Perception\Season 2\Perception S02E02 HDTV x264-LOL[ettv]\perception.202.hdtv-lol.mp4:filename
[MOVE] Rename [Z:\TV Shows\Perception\Season 2\Perception S02E02 HDTV x264-LOL[ettv]\perception.202.hdtv-lol.mp4] to [Z:\TV Shows\Perception\Season 2\Perception - S02E02 - Alienation.mp4]
[MOVE] Failed to rename [Z:\TV Shows\Perception\Season 2\Perception S02E02 HDTV x264-LOL[ettv]\perception.202.hdtv-lol.mp4]
FileSystemException: Z:\TV Shows\Perception\Season 2\Perception S02E02 HDTV x264-LOL[ettv]\perception.202.hdtv-lol.mp4 -> Z:\TV Shows\Perception\Season 2\Perception - S02E02 - Alienation.mp4: The process cannot access the file because it is being used by another process.

Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: The process cannot access the file

Post by rednoah »

The process cannot access the file because it is being used by another process.
Files can't be moved/deleted while being seeded.
:idea: Please read the FAQ and How to Request Help.
rye381
Posts: 4
Joined: 06 Jul 2013, 17:51

Re: The process cannot access the file

Post by rye381 »

Hi rednoah,

Thank you so much first off for the amazing program and the quick response. Is there anyway to delay filebot from running until the torrent is done seeding? Thank you for the help.
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: The process cannot access the file

Post by rednoah »

No idea, depends on utorrent. Is there a state-change that says "Finished seeding and closed all files"

In that case you can run filebot on torrent state change and only process things if that specific state has been reached:
http://www.filebot.net/forums/viewtopic ... =363#p2665
:idea: Please read the FAQ and How to Request Help.
rye381
Posts: 4
Joined: 06 Jul 2013, 17:51

Re: The process cannot access the file

Post by rye381 »

I now have the ut_state changed within my script, like so:

Code: Select all

filebot -script fn:amc --output "Z:/" --log-file amc.log --action move --conflict override -non-strict --def ut_state=%S ut_state_allow=11 --def music=n subtitles=n artwork=n clean=y --def "seriesFormat=TV Shows/{n}/Season {s}/{n} - {s00e00} - {t}" "movieFormat=Movies/{genres[0]}/{n} ({y})/{n} ({y}) {"CD$pi"}" "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S"
I get this though now in my logs:
Parameter: ut_state = 5
Parameter: ut_state_allow = 11
Parameter: music = n
Parameter: subtitles = n
Parameter: artwork = n
Parameter: clean = y
Parameter: seriesFormat = TV Shows/{n}/Season {s}/{n} - {s00e00} - {t}
Parameter: movieFormat = Movies/{genres[0]}/{n} ({y})/{n} ({y}) {CD$pi}
Parameter: ut_dir = Z:\TV Shows\Falling Skies\Season 3\Falling Skies S03E06 HDTV x264-ASAP[ettv]
Parameter: ut_file = Falling.Skies.S03E06.HDTV.x264-ASAP.mp4
Parameter: ut_kind = multi
Parameter: ut_title = Falling Skies S03E06 HDTV x264-ASAP[ettv]
Parameter: ut_label = ETTV (PirateBay)
Parameter: ut_state = 5
Exception: Invalid state: ut_state = 5 (expected 11)
Failure (°_°)
And here are the states that are in Utorrent:
Error - 1
Checked - 2
Paused - 3
Super seeding - 4
Seeding - 5
Downloading - 6
Super seed [F] - 7
Seeding [F] - 8
Downloading [F] - 9
Queued seed - 10
Finished - 11
Queued - 12
Stopped - 13
Not sure how to add in my script to not run it until state change of 11 occurs. Thank you so much for your help, I really do appreciate it.
rye381
Posts: 4
Joined: 06 Jul 2013, 17:51

Re: The process cannot access the file

Post by rye381 »

I figured it out. If you move the script that I had above into the "Run this program when a torrent changes state". The script will try to run when it changes to seeding but will fail. Once the torrent changes to a state of "Finished - 11", it will then go through and run the script and move the files as needed.

Will I run into any problems with filebot failing in between because of the state changes? It seems to work great but I don't know if that will have any adverse effects on filebot.

Thanks again for all your help.
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: The process cannot access the file

Post by rednoah »

That's as it should be:

Code: Select all

Exception: Invalid state: ut_state = 5 (expected 11)
If you call filebot with a state change other than 11/finished the script will abort before doing anything.
:idea: Please read the FAQ and How to Request Help.
Post Reply