jakegaisser wrote:Metamorphose is a very powerful file renamer... it is also open source, I have put in a request for a feature so that you could easily rename all the files in one swoop, instead of having to do the left pages, and then the right.
If you have Perl installed on Windows, you can do what I do. I start each new book in its own directory, within which I create subdirectories L, R, and Both.
Then, I have a little script called DIYmerge.cmd:
- Code: Select all
cd L
perl f:\Scripts\Perl\DIYrename0.plx 0 > DIYrename.cmd
call DIYrename.cmd
move *.jpg ..\Both
cd ..\R
perl f:\Scripts\Perl\DIYrename0.plx 1 > DIYrename.cmd
call DIYrename.cmd
move *.jpg ..\Both
The Perl routine itself is pretty simple too:
- Code: Select all
# glob an array of all the JPG files
@files = <*.jpg>;
# get starting page number from command line
$page = $ARGV[0];
# print "ren file.jpg page.jpg" for each file in array
foreach $file (@files) {
print "ren " . $file . " ";
printf ("%04d", $page);
print ".jpg" . "\n";
$page += 2;
}
The only complication arises when you "wrap" the page numbers in your camera. In my Canon, when I pass another 10,000 picture mark, it creates a new directory on the SD card, and starts the new image numbers with 0000, so my L and R directories end up with 9999-names which should come before 0000-names. In this circumstance, I just do my own rename before running DIYmerge:
ren 0* 5*
ren 9* 4*
DIYmerge