

#BATCH FILE RENAME MAC MOD#
Should you want to change the script in the future to account for a different ratio of frames, you could simply alter the various letter lists and change the mod value to match. Since every fourth number will result in 0, it adds 1 and moves 'd' to the beginning of the list. NB The script uses x mod 4 to determine which of the letters to use as the prefix. Move lFiles to folder l of folder frameDir - move files based on prefix Set lFiles to (disk items of folder inputDir whose name begins with l) Set name of file inFile to preName - rename file, e.g. Set end of fNameList to (pre & item f of nameList) Set preName to pre & item f of nameList - frame's resulting file name Set pre to item (f mod 4 + 1) of preList - get appropriate prefix Set inFile to inputDir & item f of nameList - frame's path and name Repeat with f in frameList - cycle through frame numbers create frames destination foldersĭo shell script "cd ~/Desktop /bin/mkdir -p frames/ - list of resulting file names Finally, it cycles through the prefixes and moves all matching files to the appropriate sorting folder (based on the first letter). It then cycles through each frame and determines which letter should be prepended to its file name, builds the new file name and renames the file (using System Events). Next, it creates some lists: of frames (e.g.

It asks for a count of how many to process but it could be set to just grab every file in the folder. It looks in a folder named 'inputs' on the desktop for your source files. "0001.png", but this is straightforward enough to change as required.įirst, it creates output sorting folders on the desktop, inside a 'frames' folder. that input files are names as in the question, e.g. The script makes some basic assumptions, e.g. This should do both parts of what you need. Or by using AppleScript in Automator, come to think of it. I have also installed a batch file renaming app called Transnomino, so if it's easier to do this using that app, I am open to doing it that way too. So as long as ABCD are aligned with the correct corresponding frame numbers, the problem is solved. The compositor will "step" according to the number in the file names. Then they could optionally be moved into folders quite easily, and composited from there: To "stack" these in compositing, I need to remap them into "layers", let's call them A, B, C, D:įrame 1: a0001.png b0001.png c0001.png d0001.pngįrame 2: a0002.png b0002.png c0002.png d0002.png The output for what will ultimately become 2 frames will look like this (8 frames):įrame 1: 0001.png 0002.png 0003.png 0004.pngįrame 2: 0005.png 0006.png 0007.png 0008.png
#BATCH FILE RENAME MAC SOFTWARE#
However the software outputting the images can only output filenames sequentially and can't be instructed to group them. This means extending the number of frames by 400%. I am rendering frames of an animation sequence and need to slow down the whole thing to get sub-frame blur and composite each each final frame from four composited frames.
