You Do Not Have Read Access to File:

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

I am trying to run a script from the command line but I keep getting this error: After Effects Error: You do not have read access to file "C:\myfile.jsx

This is what my batch file looks like

Code: Select all

"C:\Adobe\Adobe After Effects 7.0\Support Files\AfterFX.exe" -r C:\Projects\ImagesLLC\Hello.jsx"
I'm not sure what's going on. I can get AE to run script lines from the DOS file when I use -s and put my script lines in the DOS line. Anyone else have this issue?[/code]
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

Same problem on my system with the -r option

Here is workaround i've found...using the -s :
(runScript.bat)

Code: Select all

"C:\Program Files\Adobe\Adobe After Effects 7.0\Support Files\AfterFX.exe" -s "var myScriptFile = new File("C:/Hello.jsx"); myScriptFile.open(); eval(myScriptFile.read()); myScriptFile.close(); app.exitAfterLaunchAndEval = false;"
Remove the last statement if you want AE to quit after running your script.
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

Thanks nab, I thought of that after I posted and tried it and it worked. I've never seen this line app.exitAfterLaunchAndEval = false; I will have to try it out. Thanks!

Is the -r problem a bug or what? Does anyone know if Adobe is aware of it?
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

eureka i've found the solution ! (okay six month later :lol:)

the -r flag works fine when we type "afterfx" without specifying ".exe"

Code: Select all

afterfx -r c:\temp\test.jsx
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

Awesome, that's good to know.
Post Reply