Tom McDonald said:
http://www.boolean.ca/renamer/
BK Renamer 1.0
BK Renamer is a command-line utility that allows you to perform
mass renaming of files based on a UNIX-style regular expression.
Now if I could just master enough of regular expressions to select only
the bitmaps and put an "a" in front of the filename.
So far, my efforts are futile.
I don't have any regexp skills. But I was able to imitate the first
example, the simpler one, such that an "a" gets successfully prepended
to target files.
bkren "(.*)\.bmp" "a\1.bmp"
[example 1]
| bkren "(.*)\.htm" "\1.html"
| (Change all files/folders in the current directory with the .htm
| extension to have the .html extension.)
For your particular project, though, I don't see that you need something
as fancy as this. Since regular REN will take care of things like adding
characters to the front of filenames. Unless perhaps you were thinking
over other renaming schemes..
I notice how this util handles some sophisticated rename operations...
[examples 2 and 3]
| bkren -s "(.*)100(.*)" "\1303\2"
| This go through all filenames in the current directory and all
| subdirectories and change all instances of "100" in these
| filenames to "303". For example it would change bkren100.zip
| to bkren303.zip. It would also change 100monkeys.gif to
| 303monkeys.gif.
|
| bkren "(.*)\.([^.]*)" "\1_backup.\2"
| Appends _backup to all filenames, but before the file extension.
| For example, changes bkren.txt to bkren_backup.txt and test.html
| to test_backup.html.
Thanks for this find, Tom. I'm keeping it.
Yes, BK Renamer seems to be very powerful. BK ReplaceEm, from the same
author, is Pricelessware, I believe.
As for me and my screen captures, my needs are very simple. I'm doing
multiple PrntScrns on the Drempels screensaver. My *only* concern is
that files not be overwritten until I have a chance to sort through them
to see which I want to keep. There is no significant difference between
set 1 from Monday, and set 2 from Tuesday; as long as set 2 doesn't
overwrite set 1, I'm happy. But this is the fatal flaw in the Grabby
screen capture program. It starts over with Grabby01.bmp every time it
is started. Thus I need a safety net in case I forget (as I did once) to
move or rename the old files.
Starting Grabby with a shortcut to a batch file which first creates a
"difference" in the file names of any bitmaps in the Grabby SaveTo
folder, is the safety net.
Now, thanks to your efforts, and others who responded to my question, I
have a choice of methods for doing this.
Your regexp
bkren "(.*)\.bmp" "a\1.bmp"
works like a charm, and since BK Renamer is only 48k, this, I think, is
my perfect solution, useful, as you say, under both Operating Systems,
without needing a different batch file for XP and ME, as previously
explained. Although I certainly enjoyed learning how to turn LFNFOR on
and off, something no one should be ignorant of.
As for xxcopy, this is where I started three days ago, to the profit only
of the Aspirin company.
As for regular DOS REN, if that will change Grabby01.bmp to
aGrabby01.bmp, then I've been going in circles, chasing my tail like a
dog. But all I could do was to change Grabby01.bmp to arabby01.bmp, and
a second and third iteration of the command
ren *.bmp a*
produces no differencing at all.
I'm reminded of Schmendrick the Magician, who could turn a glass of water
into a handful of water...
Without your help, Karen, I would have no answer, and now I have two.
Thank you.