
- #EXIFTOOL SET FILEMODIFYDATE ON ALL FILES IN A DIRECTORY GENERATOR#
- #EXIFTOOL SET FILEMODIFYDATE ON ALL FILES IN A DIRECTORY CODE#
You may also notice that thumbnails and previews take a very long time to load and flipping quickly through a bunch of photos becomes a painful waiting game. Since Nextcloud does not read photo metadata, your albums will often appear out-of-order. Unfortunately, displaying photos is not one of them.

If you host and use a Nextcloud server, you know that it’s good at many things.
#EXIFTOOL SET FILEMODIFYDATE ON ALL FILES IN A DIRECTORY GENERATOR#
That is likely the reason for that touch failure.Better Nextcloud Photo Albums with Preview Generator and Exiftool The syntax for that exiftool date/time format, as specified, is wrong. I do not have exiftool here to test the entire workflow, and in particular that date format that it generates. Two entirely different application development tools.
#EXIFTOOL SET FILEMODIFYDATE ON ALL FILES IN A DIRECTORY CODE#
I tested that capability before I included the rest of Camelot's code within the repeat block.Īutomator applications are just the robot icon, and there will be no indication of whether it is a drag/drop application, as does the saved Application from the Script Editor. This will display every file as a quoted POSIX path that is drag/dropped on the Application. The following is a test harness that I used within an Automator application comprised of a single Run AppleScript action. I made no effort to fix any original syntax errors with the touch command. It will not run as coded in an Automator Run AppleScript action. The next step seems to be in cleaning up the command for time if that's even possible as it looks ok… perhaps we're using the incorrect timestamp?Ĭamelot's original AppleScript was intended to be exclusively run when saved as an application from the Script Editor. However upon saving it as an application and trying it I was greeted with the following error.Īlso the script above gives the app an arrow indicating it's a droplet but your script that utilizes "run" rather than "open" results in the application not having the arrow and not being able to accept items dropped on it. Set modDate to do shell script "/usr/local/bin/exiftool -'FileModifyDate' -d %Y%m%d%H%m.%S " & p

Using the info that both you and TonyT1 had provided I re-compiled the script. Neither did nor still do but perhaps we're one step closer. I was using both in hopes that one would have worked.

You now have a (untested!) script droplet - drop the relevant files onto the script icon and it should (hopefully) do the trick. If modDate ≠ "" then- make sure we got something backĭo shell script "touch -m -t " & modDate & space & p Set modDate to do shell script "exiftool -'FileModifyDate' -d %Y%m%d%H%m.%S " & p Set p toquoted form ofPOSIX path of aFile Executed when files are dropped on the script So now you just need to string these together: You can capture the output of this command and pass it into the shell command touch to set the file's modification date: wmv, this script will extract the FileModifyDate tag (with the date in a specific format):Įxiftool -'FileModifyDate' -d %Y%m%d%H%m.%S some.jpg exiftool will give you the data you need (the content's modification date) and you can combine this with a simple command to change the file's modification time.įor example, for any given.
