Reslan Posted July 18, 2007 Share Posted July 18, 2007 (edited) Hi, First i want to apologize if my question seems stupid or if the answer is actually easy to find, but i'm somewhat new to AutoIT and although i love this tool, i'm far from an expert at creating scripts with it. So, my needs: I want to make a script which compares the date of creation of all files in a folder with the current system date. If the date is older than, let's say, 7 days, i want the script to delete the file. I found a function wich is called FileGetTime, i could probably manage to get the date of the concerned files as a variable but i don't know what to do on next step: comparing the date returned from FileGetTime with current system date and execute a command if the delta between the date is > 7 Well, to be more precise i want to delete some IIS Log Files once they are older thant one or two weeks. These are very big files (~ 200 MB / day) and i badly need something to clean it automatically. I know this is possible using vbscript but i found autoit to be fare more powerful than regular vbscript so if possible i would like to use it for every administrative automation. Oh and by the way, i know my english is at best "acceptable" and i fully apologize for the mistakes i probably made. Regards, Reslan. Edited July 18, 2007 by Reslan Link to comment Share on other sites More sharing options...
Developers Jos Posted July 18, 2007 Developers Share Posted July 18, 2007 Posted this a while ago: http://www.autoitscript.com/forum/index.ph...ost&p=30391 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...
Reslan Posted July 18, 2007 Author Share Posted July 18, 2007 Posted this a while ago: http://www.autoitscript.com/forum/index.ph...ost&p=30391Thanks a lot, it seems to be exactly what i'm after. Nevertheless i couldn't find the script file you include "date.au3" on your personnal page; where could i find it? Link to comment Share on other sites More sharing options...
herewasplato Posted July 18, 2007 Share Posted July 18, 2007 Thanks a lot, it seems to be exactly what i'm after. Nevertheless i couldn't find the script file you include "date.au3" on your personnal page; where could i find it?maybeC:\Program Files\AutoIt3\Include\Date.au3 [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Reslan Posted July 18, 2007 Author Share Posted July 18, 2007 maybeC:\Program Files\AutoIt3\Include\Date.au3omg Link to comment Share on other sites More sharing options...
Developers Jos Posted July 18, 2007 Developers Share Posted July 18, 2007 Should just find it since its installed in the default Include subdirectory ... 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...
Reslan Posted July 18, 2007 Author Share Posted July 18, 2007 Should just find it since its installed in the default Include subdirectory ... Yup sorry i didn't even open the include folder before today... Link to comment Share on other sites More sharing options...
Reslan Posted July 18, 2007 Author Share Posted July 18, 2007 Yup sorry i didn't even open the include folder before today...It works perfectly, huge thanks for you Sir 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