Re: filename prefixes while transfering images from memory cards
On Tue, 2006-04-04 at 22:12 -0400, H.S. wrote:
> Ron Johnson wrote:
>
> >>
> >>Adding a prefix to all the files in a directory is as easy as
> >>
> >>for i in *; do mv $i prefix$i; done
> >
> >
> > Or you could use jhead.
> >
> > This command looks at the Exif data in each jpeg in a directory,
> > extracts the timestamp, and renames each file to the timestamp.
> >
> > $ jhead -nf%Y%m%d-%H%M%S *.[Jj][Pp][Gg]
> >
> > Good if you have many days worth of images on a memory card.
>
> Well, this method is a bit better. But I still need to manually type in
> the image filenames that I want to group together (as described in my
> other message I just sent).
I thought that in Nautilus there was a way to apply the same bash
command to every highlighted file. Looking around, though, I can't
seem to find it. Which is probably why I hate file managers.
If you know that a specific group of pictures were taken between,
for example, 7PM & 10PM on thursday, you could, after renaming them
with jhead, you could do this:
for i in `ls -1 20060330-19??.jpg 20060330-2[01]??`; do
b=`basename $i .jpg`
mv $i ${b}_Marys_bday_party.jpg
done
(Yes, I could embed the basename command in the mv statement, but I
find this easier to read.)
--
-----------------------------------------------------------------
Ron Johnson, Jr.
Jefferson, LA USA
"If thine enemy offend thee, give his child a drum."
Chinese Curse
Reply to: