Guest BinaryVision Posted June 7, 2006 Posted June 7, 2006 (edited) Set the destination path of a network drive/path and enjoy! You can easily set an executable to run at specified times using the built-in task scheduler of Windows XP, etc. expandcollapse popup#cs **************************************************************************************************** ********************** * Script Purpose: Backup Visual Studio project/web files to network drive * Script Author: Andrew S * AutoIt Version: 3.1.1 * Revision Date: 9/22/05 * Last Revised By: * Comments: **************************************************************************************************** ********************** #ce Dim $netpath,$netstatus,$destdir ;prompt to start process If MsgBox(1+64+262144,"Automated Backup","The system needs to backup your Visual Studio .NET projects." & @CR & _ "Please close all open projects and click OK to continue.") = 1 Then $netpath = "xxxxxxxxxxxxxxxxxx" $netstatus = DriveStatus($netpath) ;display error with retry option if network drive unavailable While $netstatus = "INVALID" If MsgBox(5+48+262144,"Error","The system is unable to access " & $netpath & "." & @CR & _ "Make sure the drive is accessible and click Retry to continue.") = 4 Then $netstatus = DriveStatus($netpath) Else Exit EndIf WEnd ;set destination folder $destdir = $netpath & @UserName ;delete old copy on network if exists If FileExists($destdir) Then DirRemove($destdir,1) EndIf ;copy local folders to network SplashTextOn("Automated Backup",@CR & "Copying files to network disk...",300,70,-1,-1,-1,"",14) DirCopy("C:\Inetpub\wwwroot",$destdir & "\wwwroot",1) DirCopy(@MyDocumentsDir & "\Visual Studio Projects",$destdir & "\projects",1) SplashOff() ;display confirmation message MsgBox(64+262144,"Automated Backup","Visual Studio .NET projects were copied to:" & @CR & @CR & $netpath & @UserName) Else Exit EndIf Edited June 7, 2006 by BinaryVision
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