JuhaT Posted January 27, 2015 Share Posted January 27, 2015 Hello, Is it possible to have special date snippet other than default? By default if I put {date}, I will get "27 Jan 2015", but what if I want is "yyyy_mm_dd" so basically current date in this way "2015_01_27"??? Or is it possible to create workflow to make new folder with current date using same naming style on Finder? Thanks! Link to comment
RodgerWW Posted January 27, 2015 Share Posted January 27, 2015 easily customizable ... http://www.alfredforum.com/topic/5289-adding-today’s-date/ Link to comment
JuhaT Posted January 27, 2015 Author Share Posted January 27, 2015 easily customizable ... http://www.alfredforum.com/topic/5289-adding-today’s-date/ Great RogerWW! I'm only missing 20 part from 2015. Right now I will get 15_01_27. Is it possible to have 2015_01_27? Also is it possible to create new folder to currently active location (in finder) using that date name? Thanks Link to comment
RodgerWW Posted January 27, 2015 Share Posted January 27, 2015 Use a capital Y instead of lowercase to get the full year. I'm not 100% sure how to do the folder creation with the current date. Link to comment
JuhaT Posted January 27, 2015 Author Share Posted January 27, 2015 (edited) Thanks again RogerWW. Y works just fine! Strange thing is, after running that workflow it will hit enter automatically. So basically it will return: 2015_01_27 I was looking to use this workflow for naming daily folders, but now it will add unnecessary (and un supported character) for folder naming. It's easily removable so not too big issue, but would be great if it would be one click solution. This also might be how Alfred snippet will work... Thanks Edited January 27, 2015 by JuhaT Link to comment
RodgerWW Posted January 27, 2015 Share Posted January 27, 2015 (edited) Thanks again RogerWW. Y works just fine! Strange thing is, after running that workflow it will hit enter automatically. So basically it will return: 2015_01_27 I was looking to use this workflow for naming daily folders, but now it will add unnecessary (and un supported character) for folder naming. It's easily removable so not too big issue, but would be great if it would be one click solution. This also might be how Alfred snippet will work... Thanks Well, I was pointing to the other workflow simply as an example of how the date could be changed easily using the modifiers of the date command. You will need another workflow for making the folder with a property specified ... ie: tell application "Finder" make new folder with properties {name:do shell script "date +%Y_%m_%d"} end tell This applescript will make a new folder on the desktop named "2015_01_27" For the life of me I am having a hard time remembering how to grab the front (or currently active) Finder window. EDIT: ok you could try this in a new workflow: tell application "Finder" make new folder with properties {name:do shell script "date +%Y_%m_%d"} at (the target of the front window) as alias end tell Again, this is applescript, so make a new workflow like Keyword to Script, set your preferred keyword, and add the above as applescript (osascript) into the script box. Edited January 27, 2015 by RodgerWW 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