Glad to hear it worked.
In answer to your question, the %%A represents the file name from the FOR loop. There are a set of modifiers that can be used when referencing the FOR loop variables (%%A in this case) to add some power to referencing them. I am using 3 in combination, "d" returns the drive of the file, "p" returns the path to the file, and "n" is the base name of the file. So basically everything but the extension.
You can see more info about these options by doing HELP FOR at the command prompt, I'm also attaching a cut of the section related to these variable modifiers.
A couple of other good online info sources are as follows too:
http://ss64.com/nt/http://www.robvanderwoude.com/batchfiles.php~bp