This was taken from Fred Langa's Langalist tips. ------------------------------------------------ Powerful (But A Little Geeky) Bulk Renames We've talked about "bulk rename" tools in the past, and they can be handy indeed. One common use is renaming a pile of digital photos all at once from the camera- generated names to something more descriptive but still sequential. For example, instead of something like: DSC00001.JPG DSC00002.JPG (etc.) you get something like: Grand_Canyon_vacation001.jpg Grand_Canyon_vacation002.jpg (etc.) There are tons of bulk rename tools, many free: http://www.google.com/search?q=bulk+rename+file But you don't have to buy or download anything. If you're willing to dig into the Command line just a bit, you can gin up a bulk rename tool on your own: Fred, I'm a 27-year veteran of the Computer Wars and I find something to spark my interest in every single issue of your Plus newsletter, thank you! Being an old-timer, my first thought when I saw [a question about batch renaming] was, "what a wonderful chance to use the Command Line Interface." When I worked as a Unix Admin, we used to try to outgeek each other with one-line Perl scripts. This is maybe an outshoot of that. With such structured filenames, the FOR command is the perfect solution. Mr. Alvey has filenames in the form File#.doc--that is, static text, a number, and the extension--and wants to rename them to the number, some static text, and an extension--that is #MyFile.doc. In XP (at least), FOR has an iteration structure that will allow this to work. As a test case, I went to the command line and did [written as one long line; it may line-wrap in your email client or browser]: for /l %i in (1,1,3073) do @if exist file%i.doc rename file%i.doc%iMyFile.doc This starts a FOR loop with iteration turned on (/L) and gives FOR a variable to work with (%i). Then, FOR gets the START (1), STEP (also 1), and STOP (3073) values. It will count, by STEPs from START to STOP. For each iteration, it will do the rest of the line after DO. Here, we have @ (to turn off the standard out or dumping the results to the screen--it saves a *lot* of time) and a test for the file (IF EXIST FILE%i.DOC). As I'm sure you know, the %i will be replaced by the current count of the FOR loop. If the file exists, it will be renamed from FILE%i.DOC to %iMYFILE.DOC. It takes a little less than a second and a half. The down side is that it doesn't zero-pad the numbers, so they will sort in a very ugly way (1, 10, 11...19, 100...2, 3, 30...). To get around this (again in one line!) you have to include some IF/ELSE clauses, like this [written as one long line; it may line-wrap in your email client or browser]: for /l %i in (1,1,3073) do @if exist File%i.doc if %i LSS 10 (ren File%i.doc 000%iMyFile.doc) ELSE (if %i LSS 100 (ren File%i.doc 00%iMyFile.doc) ELSE (if %i LSS 1000 (ren File%i.doc 0%iMyFile.doc) ELSE ren File%i.doc %iMyFile.doc)) Re-written for clarity: for /l %i in (1,1,3073) do @if exist File%i.doc if %i LSS 10 (ren File%i.doc 000%iMyFile.doc) ELSE (if %i LSS 100 (ren File%i.doc 00%iMyFile.doc) ELSE (if %i LSS 1000 (ren File%i.doc 0%iMyFile.doc) ELSE ren File%i.doc %iMyFile.doc ) ) This is not a "simple" method [and] it *is* horribly obfuscated by being put in one line. But the point, simply, is this: you don't always need to go find/buy software to do the task at hand. Frequently, you already have excellent tools, just waiting to do your bidding. Sorry this is so long, if any of it is useful, feel free to edit it down. Thanks for the great newsletter! - Lance C. Eck Thanks, Lance! Microsoft also offers advice on manual and semi-manual ways of doing this sort of thing: http://tinyurl.com/y82z9a Although fewer and fewer users bother exploring the command line, batch files, cmd files, macros or simple scripts, they're all powerful tools that can sometimes let you do *exactly* what you want instead of accepting a ready-made tool that only does sort of what you want. Plus, these tools are right at your fingertips, inside Windows. You've already paid for them, so why not use them? http://www.google.com/search?&q=command+line http://www.google.com/search?&q=windows+cmd http://www.google.com/search?&q=windows+batch http://www.google.com/search?&q=windows+script http://www.google.com/search?&q=windows+macro