Batch Search-n-Replace Paths

Version: 1.02 Sign up to be notified by email when a new version of this script is posted
This script will batch process folders of After Effects projects and searches and replaces all the contained footage file paths. This can come in handy if you are moving a project (or many projects) to a different folder structure like a new server. You can also use it to batch replace files in many projects at once.
The script has 2 operating modes:
- An old school method which opens each project, checks all the footage items paths then replaces the path to the new path, imports the footage item from the new location and saves out a new project. This method works with CS3 & CS4.
- A CS4 only mode that takes advantage of the new XML file format introduced in CS4. It opens each project, saves it out as an XML project (if original project is already in .aepx format then this step is skipped) and then does a search and replace on the XML file. This process is much faster since it doesn’t have to import all the footage items.
USAGE:
- It is recommended that you run the script in test mode first to see how After Effects sees the footage paths. Once you have that info you can accurately enter the search and replace strings. Note that on Mac XML projects path are separated by a colon : )
- Recurse subfolders will process and subfolders.
- Use Regex will cause the script to use Regular Expressions syntax in the search string. If you don’t know what Regular Expressions are then it’s probably best that you don’t use this option.
- Generate log will create a text file with all the results and errors encountered by the script.
- If you are running in test mode you will be able to preview the search and replace results before actually doing it. The script will save a text file with the results of the search and replace operation.
Version History
- 1.02 Fixed “Suppress dialogs” bug 01/2010
- 1.01 Fixed “undefined” error when write to network preference was not set 11/2009
- 1.0 Initial Release 11/2009









what you do is really a wonderful job!love your website
Can the script Search-n-Replace and also change the extension?
I need to batch replace a bunch of AVI files with Quicktime equivalents
Oh, it seems like it does! Yey!
This is a great idea, but I get the “undefined” error when I try to run it.
I’m using CS4 9.0.2.42 on windows XP
Is there any way to get it running?
Fixed the “undefined” error. Please re-download and let me know how it works for you. It was a small error with the dialog box that warned that you need to have the “Allow Scripts to Access Network” preference set to run the script.
Hi! I used the script with the “Use XML project” option selected. The log stated that 12 files were successfully replaced. When I opened the updated .aepx file I was prompted with the following warnings:
After Effects error: No element found
( 83 :: 2 )
After Effects warning: Unknown BIB Error. No element found, AXEParser, 1003
( 83 :: 3 )
After Effects warning: Unable to import file ’something_updated.aepx’ as project.
Any ideas as to what happened during the replace? There were no errors reported in the log file.
An observation to note:
No paths are replaced when I execute the script on the same project file with the same search string and WITHOUT the xml option selected.
Thank you for any assistance with this issue.