MaCgyver Posted February 4, 2006 Share Posted February 4, 2006 Has anyone used autoit to add a time stamp to a filename? Link to comment Share on other sites More sharing options...
flaxcrack Posted February 4, 2006 Share Posted February 4, 2006 Has anyone used autoit to add a time stamp to a filename?FileSetTime() ? [quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD() Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 4, 2006 Moderators Share Posted February 4, 2006 FileSetTime() ?Might want to say that's in the Beta version. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 4, 2006 Developers Share Posted February 4, 2006 (edited) Has anyone used autoit to add a time stamp to a filename?Something like the below will rename the copy of the file :FileCopy("c:\the\source\file.name","c:\the\backup\" & @year & @mon & @mday & "_file.name",1) Edited February 4, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
MHz Posted February 4, 2006 Share Posted February 4, 2006 Might want to say that's in the Beta version.Nah, Public release of AutoIt v3.1.1 has FileSetTime(). Link to comment Share on other sites More sharing options...
MaCgyver Posted February 4, 2006 Author Share Posted February 4, 2006 (edited) Something like the below will rename the copy of the file :FileCopy("c:\the\source\file.name","c:\the\backup\" & @year & @mon & @mday & "_file.name",1)It worked. I will freaking make a denation after I get the raise for my new promotion!!!Thanks guys!! I will be visiting this site often. I am new to scripting. I remember using a few dos commands in 2000 in my first IT job for a little troubleshooting, but nothing major at all. This software will help me tremendously in my new position.All weekend I will be learning using the tutorial. If you guys have any ideas that will help me please let me know. Now I need to add something to the above script in case the user creates more than one of the same report in the same day. I don't want the script for it, but if someone can point me in the right direction on what to read in the tutorial it will be appreciated. Edited February 4, 2006 by MaCgyver Link to comment Share on other sites More sharing options...
Developers Jos Posted February 4, 2006 Developers Share Posted February 4, 2006 This didn't work, but I am going to read the tutorial and figure it out. I don't see FileSetime in the script so maybe that is the problem, but I'm a newbie. I am really excited about this software. I am getting a promotion and this software will help me extremely in my new position. I'm looking at a real nice raise. It all depends what you want to do . Do you want to rename the backup file so it contains todays date, or do you want to update the Filedate of the backup copy ??? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
MaCgyver Posted February 4, 2006 Author Share Posted February 4, 2006 It all depends what you want to do . Do you want to rename the backup file so it contains todays date, or do you want to update the Filedate of the backup copy ???I updated my post. It worked how I wanted it to. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 4, 2006 Developers Share Posted February 4, 2006 Now I need to add something to the above script in case the user creates more than one of the same report in the same day. I don't want the script for it, but if someone can point me in the right direction on what to read in the tutorial it will be appreciated.Look for FileExists() to check if its already there .. If so start a loop to add a counter value behind the targetfilename until the file doesn't exists and then copy it.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 5, 2006 Moderators Share Posted February 5, 2006 Nah, Public release of AutoIt v3.1.1 has FileSetTime(). Dope... Both my versions are Beta!! I didn't remember it in the PR!!... So glad your always there to pick me up when I fall flat on my face Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
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