Page 1 of 1

You Do Not Have Read Access to File:

Posted: February 13th, 2007, 9:22 am
by byronnash
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]

Posted: February 13th, 2007, 11:09 pm
by nab
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.

Posted: February 14th, 2007, 6:46 am
by byronnash
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?

Posted: October 15th, 2007, 7:59 pm
by nab
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

Posted: October 16th, 2007, 5:50 am
by byronnash
Awesome, that's good to know.