I am really pulling my hair out trying to do something that you think would be simple to do in automator, but after searching net extensively, and finding only half baked solutions, I think what should be a simple task in automator is impossible.
All I want to do is prompt for a variable at which point I enter a date. Then pass that date to a shell script. Sounds simple enough. I have a screenshot at the link below which shows what I am trying to do. Here is a text description of the workflow actions:
Ask for Text (Get date variable)
Get Value of Variable (the_date)
Get Selected Finder Items (Get file names to operate on)
Run Shell Script (as arguments):
for i in "$@"
do
/usr/bin/SetFile -m "03/13/2009 09:00" "$i"
done
This works to set the file date to 03/13/2009, which I want to replace with the_date variable, or whatever.
Here's the workflow:
https://www.flickr.com/gp/zbernie/vwah0u
All I want to do is prompt for a variable at which point I enter a date. Then pass that date to a shell script. Sounds simple enough. I have a screenshot at the link below which shows what I am trying to do. Here is a text description of the workflow actions:
Ask for Text (Get date variable)
Get Value of Variable (the_date)
Get Selected Finder Items (Get file names to operate on)
Run Shell Script (as arguments):
for i in "$@"
do
/usr/bin/SetFile -m "03/13/2009 09:00" "$i"
done
This works to set the file date to 03/13/2009, which I want to replace with the_date variable, or whatever.
Here's the workflow:
https://www.flickr.com/gp/zbernie/vwah0u