Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backup routine after WINXP reinstall 1

Status
Not open for further replies.

wetton

Technical User
Jun 26, 2006
42
0
0
AU
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.

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
 
Further - I should have added that an error message appears

OLE error code 0x800a0046 Unknown COM status code

Thanks

PW
 
Hi PW,

I can't answer your question for sure, but I'll make a few guesses:

- One of the source files is open at the time you are trying to copy it (open in your application or somewhere else).

- A problem with permissions.

- Insufficient space in the target folder.

I suggest you try to figure out which file is being copied at the time the error occurs. Try removing that file from the source folder and see what effect that has.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mike

After the new install my resource file was back in the \App Dev folder instaed of 1 level above in Projects.

I thought I recognised the error - I guess I had it before and solved it myself but I'm older now <G>

PW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top