- Open up Automator.app located in your Applications folder.
- Choose ”Service” in the dialog sheet when creating a new document.
- In the
Services receives selected:
menu at the top of the ”Canvas” on the right, change to ”Files & Folders”. - In the sidebar to the left, search for
Get Selected Finder Items
- Drag this Action to the ”canvas” on the right side.
- Again, go to the sidebar at the left and this time search for
Run Shell Script
- Drag the
Run Shell Script
action to the ”canvas” on the right side. - At the right in the
Run Shell Script
action, change thePass input
fromto stdin
toas arguments
- Copy paste this into the action text box, removing the
Cat
command in the text box:
for f in "$@"
do
touch "$f"
done
Save the Service into /Users/yourusername/Library/Services
. Test it by select a file(s) or folder(s) in the Finder and Right-Click
and go to end at the Context menu labeled ”Services” and look for the name you gave your Service. If everything works alright,
the selected file(s) or folder(s) should have updated modification dates. It doesn't alter
the file(s) or folder(s) except the modification date.
Thanks, simple and clever!