Your goung about it the hard way. Do this instead. Create a simple action or actions that process the image the way or ways you want them processed. The actions should not resize or save image they should just process the image the way you want them processed. Once you have these actions. Download and install the Image Processor Pro plug-in script into your Photoshop version CS5, CS6, CC. from Russell Browns web site. Then use menu File>Automate>Image Processor Pro. Set the Image Processor Pro dialog to process your image files and save all the output files you want with the sizes and names you want. Have the Image process include you action or actions in its process.
Thanks for the reply. I have more than a few actions for saving files acording to different cameras and the needs of specific clients. I make all my file correcctions and simply hit an "F"key and the file is saved in the various formats/sizes required. What I would like to do is rename the file during the correction process. Is this possible?
Forgot to mention earlier
That really sounds like an OS function. I'm not sure you can really change the name of a file when it is opened by any program. As John mentioned above, you could do a roundabout method, but it still comes down to doing a save as. A script could be created to rename all the saveas files that you're creating rather than having to rename each file.
Photoshop is a document editor. It saves file for documents it is working on. If the document your working on was opened from a existing image file. The documents has a backing file. In this case you can rename the current document backing file while the document is open in Photoshop for it's not kept open to
lock the file. So any application can rename the backing file including Photoshop via a script.