Using Automator to change the creation date of a folder in Mojave
Solution 1:
Without seeing what you already have in your Automator workflow the only suggestion I can make is the following example shell script code is how I would set the creation date, to the date/time of execution (or current date/time), on a target folder containing the folders the creation date should be changed for:
find '/path/to/parent/folder' -type d -print0 | xargs -0 -I {} SetFile -d "$(date -j "+%m/%d/%Y %T")" {}
The example shell script code uses the find
command to find all directories within '/path/to/parent/folder'
, passing a null terminated string (a list of the directories found) to xargs
and executes SetFile
with the strings as arguments. Thus changing the creation date on the directories (folders).
Obviously '/path/to/parent/folder'
will need to be defined, literally or tokenized, and again without seeing what you already have, I'm not going to waste time guessing, to offer variations on the example shell script code.