I have thousands of photos in many folders. I want to batch resize them to e.g. 3000px on the longest dimension and keep the timestamp intact.
I have used the wonderfully simple tool Phatch to resize all files but the files' original timestamps are gone and there's no setting in Phatch to avoid this. So I now have a master folder with all the originals, and another folder with the Phatch results - just in case this helps.
- Platform: Linux (Ubuntu)
- Source files: 2000 JPG files in many subfolders
- Target: resized to 3000px (unless already smaller than that),
- either resize files in place
- or save as copy using same folder structure
- keep original file names and timestamps intact
I'm not enough of a Linux person (yet) to know what tools I could use (imagemagick? mogrify?) and how but I'll happily accept any hints!
touch
supports timestamps. You still have the old files, thus you have the old filename with assorted date. It is possible to write a script using this information and touch. (But ENOTENOUGHCOFFEE so I am not writing it atm).