i don't think you can do it as a macro kind of thing, but you could try making a "template" script in the GUI with a placeholder filein node called "FILEIN" and "FILEOUT" and then write a script with some kind of grep pattern to rename those (and the script name) based on on a directory with files.
clearly it helps if you know more about perl then i do ![]()
++ chris