gammawert Posted June 15, 2016 Share Posted June 15, 2016 Hello everybody. The problem: I am dealing with a lot of files in my office-job. We have a naming convention, that every file starts with the recursive date. For loremipsum.txt created today, it would be 160615-loremipsum.txt, basically %y%m%d-filename I would like to have a workflow that creates the date automagically. The solution? In theory I think I know how to do it (1) Keyword (2) Terminal Command, which executes date +%y%m%d (3) Copy to Clipboard with the option set, to automatically paste to front most app. I tried setting up a workflow like described above, but wasn't successful. It just opened up a terminal executing the command. But the terminal should not open, ideally the command is executed in the background and the output of the command should be pasted to the front most app, which my version of the workflow didn't do as well. I am thankful for any advice on how to set up a workflow for this problem correctly. Link to comment
dfay Posted June 15, 2016 Share Posted June 15, 2016 You should use a Run Script object instead of Terminal Command. Alternatively you can do this without a workflow at all using a snippet with dynamic placeholders - see https://www.alfredapp.com/help/features/clipboard/dynamic-placeholders/ gammawert 1 Link to comment
gammawert Posted June 20, 2016 Author Share Posted June 20, 2016 You should use a Run Script object instead of Terminal Command. Alternatively you can do this without a workflow at all using a snippet with dynamic placeholders - see https://www.alfredapp.com/help/features/clipboard/dynamic-placeholders/ The snippet-solution is perfect. Thanks for pointing this out. Sometimes, things can be so simple Link to comment
deanishe Posted June 22, 2016 Share Posted June 22, 2016 FWIW, nothing about this request is recursive. That's not what "recursive" means. In order to understand recursion, you must first understand recursion. Vero 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now