Sign in to follow this  
Followers 0
waster

AutoIT Command line syntax

6 posts in this topic

I wondered if anyone can help me!

I have written a script to automate NT backup on a Windows 2003 Server. I want the file name that I am backing up to is based on todays date.

My script is very simple and looks like the one below:

Runwait ("ntbackup backup systemstate /f c:\Test.bkf")

exit

I want to substitute the c:\test.bfk with todays date, for example 24102005.bkf.

Is this easy? Does anybody have any suggestions as to what I can do.

Share this post


Link to post
Share on other sites



That is what macro's are for...

Runwait ("ntbackup backup systemstate /f " & @MDAY & @MON & @YEAR & ".bkf")

Share this post


Link to post
Share on other sites

Many thanks that seems to work!

I must admit I had been trying with the macros, just I had the syntax wrong, thanks.

Share this post


Link to post
Share on other sites

Your welcome B)

Share this post


Link to post
Share on other sites

For enhanced sorting purposes could I suggest @YEAR & @MON & @MDAY & ".bkf"?

Share this post


Link to post
Share on other sites

Here's a more complex script I wrote, that works pretty darn good for multiple backup jobs. Requires include of the UnixTime.au3 and Array.au3 UDF's. Extract the zip, and modify the Backup.ini file to fit your backup requirements. Backup.zip

DataDir is where the backup set is located. You'll need to create and save the backup set from NTBackup first.

BackupLocation (where you want the backup to be saved, when doing disk to file backups.)

***PoolFile: Set this to a file name or tape media name for tapes (ex. mine is 4mm DDS.)

The logarray function isn't working.

The script works great, but I didn't design it to be portable, so you might need to tweak it some more. If you have trouble getting it to work, let me know.


Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

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