Project

General

Profile

Can I process a whole tree of directories?

Added by Rowan Sylvester-Bradley over 10 years ago

Can Exiv2 process all the JPG files (or all the JPG files whose names match a pattern) in a whole directory tree, including recursively all sub-directories? Or do I have to use some sort of construction using the MSDOS FOR command to do this? I ask this because I have thousands of photos in a directory tree, some taken on my camera, some on my wife's camera, some that I've copied from other places. I want to adjust the created time by -01:10:54 on just the photos taken on my wife's camera so the clock matches that on my camera. What I'd like to do is something like exiv2 -a-01:10:54 DSC*.JPG but for this to recurse through all subdirectories. Also I'd really like to change the names of the files as I go.

Thanks for you help - Rowan


Replies (2)

RE: Can I process a whole tree of directories? - Added by Andreas Huggel over 10 years ago

Exiv2 can operate on all files in a directory at once, but it doesn't recurse through a directory tree. You need to call exiv2 in a loop over all your directories, once for all directories (or twice, once to rename the file and once to adjust the timestamp).

Andreas

RE: Can I process a whole tree of directories? - Added by Robin Mills over 10 years ago

The UNIX command "find" is very useful for recursive directory processing. Cygwin provides a good emulation of most of the UNIX command on Windows and I find this very useful.

When it comes to using DOS, I find .bat files rather limited by comparison with the bash shell in UNIX and Cygwin. However, this web site: http://www.dostips.com/ contains many scripts and recipes to achieve impressive results with DOS.

    (1-2/2)