[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: filename prefixes while transfering images from memory cards



On Tue, 2006-04-04 at 20:37 -0400, kamaraju kusumanchi wrote:
> H.S. wrote:
> > Hi,
> >
> > In gtkam, and maybe also in digikam, when we connect a camera and
> > download images to the hard disk, we can specify the destination folder
> > and also filename prefixes (along with dates IIRC) and get appropriate
> > image file names, e.g. 20060404_funpicnic.jpg. This is very helpful in
> > sorting the pictures.
> >
> > I was wondering, can this be done when I am transfering images from a
> > memory card (through a card reader) instead of from a camera directly?
> >
> > ->HS
> >   
> 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.

$ apt-cache show jhead
Package: jhead
Priority: optional
Section: graphics
Installed-Size: 140
Maintainer: Ludovic Rousseau <rousseau@debian.org>
Architecture: i386
Version: 2.50-1
Depends: libc6 (>= 2.3.5-1), libjpeg-progs
Filename: pool/main/j/jhead/jhead_2.50-1_i386.deb
Size: 47718
MD5sum: 3004227f6de53b2b132cf87868d4acb7
Description: manipulate the non-image part of Exif compliant JPEG files
 jhead is a command line driven utility for extracting digital camera settings
 from the Exif format files used by many digital cameras. It handles the
 various confusing ways these can be expressed, and displays them as F-stop,
 shutter speed, etc. It is also able to reduce the size of digital camera JPEGs
 without loss of information, by deleting integral thumbnails that digital
 cameras put into the Exif header.
 .
 Upstream is: http://www.sentex.net/~mwandel/jhead/
Tag: interface::commandline, made-of::lang:c, role::sw:utility, works-with::image:raster:jpg

> (tested under bash). So one approach is to copy the files from the 
> memory card to a temporary directory and run the above command.
> 
> More such goodies can be learned by reading "The Advanced Bash-Scripting 
> Guide" (apt-get install abs-guide).
> 
> Does that help solve your problem?

-- 
-----------------------------------------------------------------
Ron Johnson, Jr.
Jefferson, LA USA

"If you don't know how to do something, you don't know how to do
it with a computer."
Anonymous



Reply to: