[ad_1]
I’m attempting to include an exiftool command into an Applescript routine that performs complicated picture manipulations. The next routine is geared toward modifying the creation dates and modification dates of the picture information moved to a listing after manipulation.
I wish to use the basic exiftool command:
exiftool "-filemodifydate<datetimeoriginal" "-filecreatedate<datetimeoriginal" DIR
Nonetheless the listing is known as by the script with the command :
set pTargetFoldername to "Edited-pictures" & area & date string of (present date) & area & time of (present date) as string
.
And subsequently the listing identify accommodates areas.
My routine AdjustDates
doesn’t work. The ensuing command doesn’t compensate for the areas and can’t be utilized in a “do shell script cmd” name The command created (with the dates within the native french language) is :
"/usr/native/bin/exiftool -filemodifydate<datetimeoriginal -filecreatedate<datetimeoriginal '/Customers/yves/Desktop/Edited-Photos mercredi 31 juillet 2024 70545'"
I don’t appear to see an answer which ought to appear trivial.
on AdjustDates(pTargetFolderPath)
inform utility "Finder"
set ThePath to (POSIX path of pTargetFolderPath)
finish inform
set exiftool_path to "/usr/native/bin/exiftool"
set exiftool_args to "-filemodifydate<datetimeoriginal" & area & "-filecreatedate<datetimeoriginal"
set cmd to exiftool_path & area & exiftool_args & area & (quoted type of ThePath)
return cmd --for check solely
--do shell script cmd -- not purposeful because of the areas within the listing path
finish AdjustDates
[ad_2]