Scripting the Path to the AE Cache

Moderators: Disciple, zlovatt

Post Reply
hwbags
Posts: 3
Joined: November 18th, 2011, 5:38 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: 21
Joined: December 10th, 2006, 10:23 pm
Contact:

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
Posts: 3
Joined: November 18th, 2011, 5:38 pm

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
Post Reply