[brlug-general] Script help
Tim Fournet
tfournet at tfour.net
Wed May 30 08:56:49 CDT 2007
Some command-line utilities that may help you:
rename - for renaming the files if you need to. It's more flexible than
using the 'mv' command since it uses patterns within the filename
identify - part of the ImageMagick package - it will display information
about the images, as well as the data portions as you were asking about
Joe Fruchey wrote:
> I've been using F-Spot for photo organization lately. I like how it
> automatically copies files into a date-based directory structure,
> unlike Picasa which makes you sort it out yourself.
>
> I inadvertently double-imported some photos. F-Spot has named those
> photos XXXX-1.JPG
>
> In all subdirectories of my ~/Photos directory, I would like to MOVE
> all *-1.[JPG,jpg] to ~/Photos/dupes. That's the easy part. Then, I
> want to COPY the associated non-1 file to dupes as well, that way I
> can manually check to see if there are any that are not actually
> dupes. Also, if XXX-1 exists, but XXX does not, I want to leave XXX
> alone.
>
> ... Is there an easy way to traverse subdirectories? I saw that mv
> doesn't have an available -R option, but cp and rm do... but that only
> seems to work if you're copying or deleting an entire directory.
>
> Anyhow, the second thing I want to do is search for files by number.
> For instance, my camera produces images named P1010001.JPG. I want a
> script that will check my ~/Photos directory and, for instance, if it
> finds P1040586.JPG, then P1040622.JPG, with no intermediates, notify
> me so I can be aware that I'm missing a chunk of photos. If it can
> display EXIF data, that'd be great too, and maybe even a thumbnail.
>
> I'm not asking anyone to write these scripts for me, but rather to
> point me in the direction of some resources that may help me. Can this
> be done with Python? I've been wanting to learn Python anyway...
>
> _______________________________________________
> General mailing list
> General at brlug.net
> http://mail.brlug.net/mailman/listinfo/general_brlug.net
>
More information about the General
mailing list