Page 2 of 2

Re: A few hundred images (in the right order) to pdf

Posted: 2010-05-10T22:13:12-07:00
by jamtat
anthony wrote:No need to modify, Just use it as I said.

mv_perl 's/\d+/sprintf "%05d", $&/eg' files...
Thanks for the further input. I guess I misunderstood. But, in fact, I still don't understand. I can understand that mv_perl is a perl script, and I know how to run a perl script. I can also guess that the stuff inside inverted commas is an option that gets passed to the script--correct? But I'm drawing a blank on the "files..." part. Am I supposed to insert something in place of "files..."? Does the script handle wildcards--like *.jpeg? If I could grok perl I could probably look at the script and tell that. But the only thing I grok about perl at the moment is how to run a script someone else has constructed. If you can offer any further clarification, that would be appreciated.

James

Re: A few hundred images (in the right order) to pdf

Posted: 2010-05-11T00:03:44-07:00
by anthony
The "file..." is the list of file names to 'fix' using the perl regular expression given (expand all numbers to '5' digits). You can just put '*' here to 'fix' all the file names.

Sorry but the script does assume that you have a "merge" script, which is a non-destructive rename program. Use -f to have it just directly rename the files...

mv_perl -f 's/\d+/sprintf "%05d", $&/eg' filenames_to_rename_here...

The perl script is quite common around the web and is based on one written by Larry Wall originally.