Re: Read Text File to Rename Images - Please help! [A bit OT]
Re: Read Text File to Rename Images - Please help! [A bit OT]
- Subject: Re: Read Text File to Rename Images - Please help! [A bit OT]
- From: Paul McCann <email@hidden>
- Date: Thu, 06 Sep 2001 18:03:26 +0930
Scott wrote...
>
Also, if you are comparing the two scripts, note that the perl script makes a
>
copy of the file and renames that; the AppleScript merely renames them.
Hey, you're playing rough! I'm pretty sure that the prescription was to both
(a) make a copy with a new name, *and* (b) rename the original. Or something
to that effect. Here we go:
**As an example, the original jpgs look like this; '10-10203.jpg' and would
need to change to 'p12345a.jpg', etc. Also, I need to duplicate the newly
named file, and give it to 'p12345s.jpg'.**
If you just want the renaming you can delete the "cp" line in my original
script and accelerate things considerably!
>
(I guess if you write AppleScript, you keep
>
more of the user-centric Mac attitude.) This is easy because making a droplet
>
is built right in to AppleScript, and because AppleScript has persistent
>
properties.
Yep, persistent properties are nice in Applescript. You'd probably have to
venture into MacOSX country and "Inline::Files" to get on-board properties
in Perl; even then the interface is somewhat grimier (but you get a lot of
power in return). MacPerl allows saving scripts as droplets, so no points
for that one!
Cheers,
Paul