Finding and Renaming Problem


Hey guys! Thanks for taking the time to read.
Here is my question:
In an attempt to batch rename all my pictures, I ended up changing all the names to "".jpeg00001, .jpeg00002 ...etc etc - instead of 00001.jpeg, 00002.jpeg - you get the idea...
Now I am having a problem trying to retrieve the files and renaming them correctly.
I have tried using Automator but could not find a way around it.
the pictures are in the folder, but since the name is blank = "".jpeg000...
I dont see anything...
However, when I try to import the folders to iphoto, it tells me .jpeg0001 is not a valid files extension
Does any of you have any idea how I would retrieve and batch rename these files? Automator seems like a tool that could be used.
thanks once again for your time,