each evening, we run the following to copy to a folder on the server with sub folders for each day of the week. Giving us a 7 day rotation before the next week
LPARAMETERS lcFolderLocationToCopyFrom, lcFolderLocationtoCopyTo
lcComputerName = Strtran(Alltrim(Left(Sys(0),At('#',Sys(0))-1)),' ','')
lcDayName =Cdow(Date())
*** make sure we have a directory with the lccomputer name for the day
lcDirectory = lcFolderLocationtoCopyTo+lcDayName+'\'+lcComputerName
Try
Mkdir(lcDirectory)
lsuccess = .T.
Catch
lsuccess = .F.
Endtry
Create Cursor myCursor (dirname c(40))
cNo=Adir(myArray,lcFolderLocationToCopyFrom,"D")
For i = 1 To cNo
Append Blank
Replace myCursor.dirname With myArray(i,1)
Endfor
Select myCursor
Scan
lcFolderName = Upper(Alltrim(myCursor.dirname))
If 'CH_' = Left(lcFolderName,3)
lcFrom = lcFolderLocationToCopyFrom+'\'+lcFolderName
lcTo = lcDirectory+'\'+lcFolderName
*** make sure folder exists
Try
Mkdir(lcTo)
lsuccess = .T.
Catch
lsuccess = .F.
Endtry
cmacro = 'xcopy '+lcFrom +' '+lcTo+' /s /y'
Try
Run /N &cmacro
Catch
Endtry
Endif
Endscan
Set Safety Off
lcDirectory = lcFolderLocationtoCopyTo+lcDayName+'\'+lcComputerName
Strtofile(Ttoc(Datetime()),lcDirectory+'\timestamp.txt')
>Anyone remember (like I do) a service to backup all files on your computer to a remote server somewhere on the internet - the actual app installed on your local machine was a VFP executable. (This would be a competitor to Carbonite, Mozy, and similar services.)
>
>TIA!
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only