I have the follwomh backup routine prg gleaned form these pages some time ago. I have been using it many times a day as my app progresses. I had to reinstall WINXP two days ago.
The routine still runs and copies some of the files in the folder then the debugger opens on the line marked <-------
in the below code.
Any one any clues?
Thanks PW
The routine still runs and copies some of the files in the folder then the debugger opens on the line marked <-------
in the below code.
Code:
CLOSE ALL DATABASES
public changes
changes = ''
do form frmbackup && use text box to annotate backup folder
changes = ' '+alltrim(changes)
*-- Getting the date as yyyymmdd is easy.
lcToday = DTOS(DATE())
*-- The time has colons between hours, minutes, and seconds.
*-- These are illegal in a file name so change them to underscores.
lcNow = CHRTRAN(TIME(), ':', '-')
lcTimeStamp = lcToday + '_at_' + subst(lcNow,1,5)
lcDevDir = 'C:\DEV\_Foxpro\Projects\Myproject'
*-- The folder 'C:\R_Drive\Backup\must exist
lcBackupDir = 'C:\R_Drive\Backup\Myproject\' + lcTimeStamp + changes
fso= CREATEOBJECT ('Scripting.FileSystemObject')
fso.CopyFolder (lcDevDir, lcBackupDir) <--------------
fso = null
?'Finished'
Any one any clues?
Thanks PW