Link to home
Start Free TrialLog in
Avatar of TheDadCoder
TheDadCoder

asked on

Script to sort files by creation date

Hi,

I have tons of family picture files in png/jpg format that I want to sort.  Using a script on the mac I want the script to traverse a given directory structure and moving all files into another path which is a flat directory with only folders with newly moved files, in the folder format name of YYYY MM DD

Source folder:  /users/<myname>/pictures/picstosort
(This is a folder full of other folders and pics in the root of this folder that needs to be traversed fully)

Destination folder: /users/<myname>/pictures/library
(Folders in here are in the format YYYY MM DD)


Can anyone write this script for me, i don't have a clue how to do this?

Is this even possible!

Thanks,
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Hi, I'm probably not able to help you out but:

- Do the file names have date/time info in them as well or is just the timestamp basis for sorting?
- Which scripting language do you suggest experts use the solve your question?
Avatar of TheDadCoder
TheDadCoder

ASKER

Hi gerwinjansen, thanks for the response.

I'm not concerned about which scripting lang is used, the result is what i need :)

in terms of your first question, the filename itself can't be used it's just all random filenaming.   I was hoping the script would make use of the meta data of the file, i.e. the Created date.

Is this possible?
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi ozo,

Does this search by meta data if the picture taken date? Or just the file?
It uses the time of last data modification timestamp.
Did you want to use something else?
Hi, reviewing a sample of the 100,000 image files that I have, some have an inaccurate date time for the modified date.

So these would need to use the camera's meta data instead. If no meta exists, then to use the last modified date.

Is that possible?
Do you have a script to extract the camera's meta data that my script can call?
Or do you have a specification of how the metadata is stored so I can write a routine to extract it?