No, I didn't give up on the thread, I just went to work with what you gave me to see what I could do with it. It's just that you've been nothing but extremely helpful and patient with me in the past; and I started to feel like I was coming to the board, putting up my problems, and you do everything for me. I know you're here to contribute to the community, but I don't like to take advantage. I am making an effort to learn this stuff now, I just have to make baby steps!
Okay, here is the deal with this item. I actually want to apply this with more than one operation, but the basic script or concept would remain pretty much the same. We create lots of documents like invoices, receipts, shipping labels, etc., that usually get saved as pdf onto the desktop. Then, they are named, often with the date and particular file name and finally moved into the proper folders. For example, shipping labels get saved to desktop with the default name of something like
vty3RlsIK.LabelGenerationServlet.part
Then I would change the name to something like
12-31-2009
USPSLabel.pdf
Then, I would move it to the folder where we keep the shipping labels for records.
So, the service I created actually does more than just moving the file. It goes like this:
service receives selected pdf
in finder
name single item in finder item names (to: USPS_Label.pdf)
add date or time to finder item names (before name, underscore separator)
move finder items (to target folder)
open finder item (with default application)
The other ones I need would be similar, except they don't usually need to be opened afterward, just named and moved, for the most part. I figured I could continue to just use the name change function of automator before running the script, but if would run faster or more efficiently if that were also part of the script, I suppose that would be better. And I would like to be able to have the numbers go up through as many as I need. If it's a matter of just adding in all the possibilities of existing names up to the number I need, that's tedious work I don't mind doing now to save on having to name all these files in the future!
Also, these files are always named differently, so the source file would need to just be selected file, not the actual name.
Finally, I tried to play with the script to name the desktop like you said, but would it be something like
set source_folder to folder (path to desktop)
or
set source_folder to (path to desktop)
I still need to learn a little more before I understand the way that works. I am so used to only using the unix path, I like the ability to use (path to desktop) that's really interesting.
I think I may have rambled a bit, but that should explain the details of what I'm trying to accomplish.
thanks