Sign in to follow this  
Followers 0
keilamym

append curent date and time to filename?

4 posts in this topic

hey everyone...

i have a tool i created that created a log file... once i rerun the script, id like it to archive the previous logfile, and create a new one... is there a way to append the current date and time to the file name. i've tried items like $date_time=_NowCalc() and used $date_time to appent to the name but i comes back blank... I figured maybe my script was wrong so i put it into a message box and the path is correct...

do anyone else do this and if so, can you please let me know what command your using to append the date to a filename. i can append items like workstation name to a log file but the current date and time isnt working for me..

thanks again

Share this post


Link to post
Share on other sites



ok i did more seaching and reading.. if i cant figure it out, i'll come back.. please just ignore this for now...

Share this post


Link to post
Share on other sites

Just concatenate a string using the various date/time macros available in AutoIt. (e.g. @MON, @MDAY, @HOUR, etc)

Share this post


Link to post
Share on other sites

i figured it out after seeing some examples of what others were doing.. funny what a little reading will get you right.. lol..

thanks..

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0