Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
hwbags
Topic Author
Posts: 3
Joined: Fri Nov 18, 2011 5:38 pm

Scripting the Path to the AE Cache

Fri Oct 16, 2015 3:21 pm

I am using an external drive for the AE Cache. Rarely does the Cache have to carry over from session to session. SInce I often have different drives I am continually resetting this via preferences. One solution is to replace the preferences file. The other solution would be to somehow script this change in the file
------- Here is sample Cache Adobe After Effects 11.0-x64 Prefs
["Disk Cache Controls"]
"Enabled 2" = "1"
"Folder 6" = "/Volumes/1TB_NO_useAT_AET/ AE_CACHE/AE1"
"Max Size 3" = "46"
--------------------I want to change ------------------
"Folder 6" = "/Volumes/1TB_NO_useAT_AET/ AE_CACHE/AE1"
TO
"Folder 6" = "/Volumes/hyenna/ AE_CACHE/AE1"

with a script

How can this be done????????
 
stib
Posts: 15
Joined: Sun Dec 10, 2006 10:23 pm
Contact:

Re: Scripting the Path to the AE Cache

Thu Oct 22, 2015 5:08 am

As far as scripting AE goes I think you're out of luck. The After Effects scripting guide mentions cache settings regarding memory usage, but not anything related to the cache file location.

Assuming OSX by your path, you could use this shell script to kludge it:

cat <path to your current prefs file>|sed 's|"Folder 6 =".*|"Folder 6" = "/Volumes/hyenna/ AE_CACHE/AE1"|"><path to new prefs file>
mv <path to current prefs file> > ~/Desktop/AE-prefs.old
mv <path to new prefs file> <path to current prefs file>

this copies the old prefs file to a new prefs file through the sed command which replaces any line it finds that starts with "Folder 6 = " with line you want, then backs up your old prefs to the desktop and moves the new hacked prefs file to the original location. Obviously you have to fill in the paths yourself (it's easiest to just drop the files on the terminal window to get the paths).
 
hwbags
Topic Author
Posts: 3
Joined: Fri Nov 18, 2011 5:38 pm

Re: Scripting the Path to the AE Cache

Thu Oct 22, 2015 6:54 am

Thanks,
I thought it would be doable via the shell which I have used for years; still plenty difficult.
Might be worth the effort.
Don

Who is online

Users browsing this forum: No registered users and 1 guest