stouty Posted March 25, 2013 Share Posted March 25, 2013 (edited) Select a file in Finder and hit your hotkey. Adds the date to the filename before the suffix E.g. Item Name.xxx -> Item Name-03-25-2013.xxx Add Date To Filename.alfredworkflow Default date format changed to YYYYMMDD per advice from atadams. Now: Item Name.xxx -> Item Name-20130523.xxx v1.1: Add Date To Filename.alfredworkflow Edited March 26, 2013 by stouty Link to comment
atadams Posted March 25, 2013 Share Posted March 25, 2013 Nice. Although I did modify the Automater workflow to use a YYYYMMDD format. I find this format much better for filenames. Link to comment
nickvitale Posted March 25, 2013 Share Posted March 25, 2013 It it possible to make this output the following format; 2013-03-25 08-46 PM I'd like to insert "2013-03-25 08-46 PM" before the file name, I find it's better for sorting and finding files. I tried it myself, but I failed as it was in Automator and I have no coding skills whatsoever (even though one might argue Automator doesn't require any.) I have another extension I found from some one using bash to copy the date and time to the clipboard. I was able to modify that script for the above format. Since this is an automator action, I tried everything I could think of, I just fail in coding. If not, no worries, right now I just manually replace the filename or I save it correctly at the time of creation. I also use the current date and time, not the created date. Regardless, thanks, always appreciate new workflows. Link to comment
stouty Posted March 26, 2013 Author Share Posted March 26, 2013 Nice. Although I did modify the Automater workflow to use a YYYYMMDD format. I find this format much better for filenames. Yes, I'd like to re-write so it takes options for the date/time format and insert location. Easier to re-write as a shell script I think if I want that. Link to comment
stouty Posted March 26, 2013 Author Share Posted March 26, 2013 It it possible to make this output the following format; 2013-03-25 08-46 PM I'd like to insert "2013-03-25 08-46 PM" before the file name, I find it's better for sorting and finding files. I tried it myself, but I failed as it was in Automator and I have no coding skills whatsoever (even though one might argue Automator doesn't require any.) I have another extension I found from some one using bash to copy the date and time to the clipboard. I was able to modify that script for the above format. Since this is an automator action, I tried everything I could think of, I just fail in coding. If not, no worries, right now I just manually replace the filename or I save it correctly at the time of creation. I also use the current date and time, not the created date. Regardless, thanks, always appreciate new workflows. Here you go: Add Date and Time Before Filename.alfredworkflow Only tested briefly, so let me know if you have any issues. Link to comment
atadams Posted March 26, 2013 Share Posted March 26, 2013 @stouty The advantage of having YYYYMMDD at the end of the filename is a sort by name will also sort similar files by date. Link to comment
stouty Posted March 26, 2013 Author Share Posted March 26, 2013 @stouty The advantage of having YYYYMMDD at the end of the filename is a sort by name will also sort similar files by date. I'll change it so YYYYMMDD is the default. I've been working on a way for the user to choose from some defaults or add their own Link to comment
stouty Posted March 26, 2013 Author Share Posted March 26, 2013 @stouty The advantage of having YYYYMMDD at the end of the filename is a sort by name will also sort similar files by date. The original workflow used date created .. I actually meant the current timestamp. What do you think people would prefer? Link to comment
nickvitale Posted March 26, 2013 Share Posted March 26, 2013 Here you go: Add Date and Time Before Filename.alfredworkflow Only tested briefly, so let me know if you have any issues. Hoozah! Thank you! Awesome. Looking at the Automator workflow file I see where I went astray. Thanks again, this is hugely useful. I reckon the guys at work will be jealous at that. Thanks again! Link to comment
pjdube Posted March 30, 2013 Share Posted March 30, 2013 See below workflow. You are able to add the creation date or a custom date to your file names before or after the filename. This will as an example rename the item as follows: 2013-2-30 16-40 Test.jpg 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