Dave Girard's 101 Autodesk® Maya® Tips is now available in Kindle, interactive iPad edition and DRM-free EPUB/PDF editions. Work faster, cry less. Read more about the ebook.




Follow cgbeige on Twitter

Topics by tag:



Recently published articles by Dave G:



Free downloads by Dave G:



Mac OS X-only downloads:

Automator Workflow to Migrate Maya ASCII/Nuke/plaintext Files to Another Disk

I am just moving my work to a new Lacie 2big Thunderbolt enclosure and wanted to save myself annoying task of migrating all my existing work to link to the new disk in place of my old one. There are nice utilities like FileTextureManager for Maya and Nuke has a find/replace that do this on a per-scene basis but this seemed slow since I would be doing the exact same replacement for all future files.

So I made an Automator workflow that reads plain text files and substitutes my “dullard/WORK_mbp” path in the file with “lackey/WORK” and then creates a new file next to the old one so nothing is clobbered. Since Maya ASCII and Nuke files are plain text, the script can use the Unix utils awk and sed as if it were just working on a big (and quite boring) essay.

See it in action:

Grab the Automator workflow here. Obviously, you’ll need to edit the workflow in Automator to substitute your paths instead of mine:

The text between the % are the find and replace terms. The script doesn’t overwrite any files but just for the sake of legalese, it comes with no guarantees.

0 notes | Permalink