Batch Search and Replace Paths

All things .jsx

Moderator: Paul Tuersley

Post Reply
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

Image

Batch process folders of After Effects projects and search and replace file paths. This can come in handy if you are moving a project to a different folder structure like a new server. You can also use it to batch replace files in many projects at once.

Download:
http://aescripts.com/batch-search-n-replace-paths/

This script will batch process folders of After Effects projects and search and replace 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.
Post Reply