Jump to content

File execution once per day

Recommended Posts


I do an automatic backup via batch-file in the autostart (backup.bat).

Because I dont want this to be done every time I restart my PC, can somebody send me a script how to use it in conjunction with AutoIt, so that the program first checks if a backup has already been done on that specific day???

The backup files are on drive D:, and one of the files is named WAP00001.MDB or archive.pst (Outlook). The date of last backup is shown in that directory in Windows Explorer.

Thanks in advance for any explanations,


Link to post
Share on other sites

I use autoit with task squeduler, but you can also do this quite easy.

just use FileGetTime ( "filename" [,option] )

so basically check the backup file each time, or have a log file, and check that.

I filewriteline() an entry after each sucessful backup, and at the begining of the script I do a FileGetTime () and match the day portion to @day, if it doens't match, you didn't back up that day.

You can place it in the startup, and have it sleep for a few hours, or what ever your fancy. You can use @hour and @min to set start times, etc etc.

If you still need help, I can post up a quick easy one, but this info should get you started if you want to do it yourself.

AutoIt3, the MACGYVER Pocket Knife for computers.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...