Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Backup App in VFP?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01489704
Message ID:
01489830
Vues:
79
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!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform