Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Safe way to delete files
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Safe way to delete files
Miscellaneous
Thread ID:
00603620
Message ID:
00603620
Views:
52
Hi everybody,

I have the following lines of code:
lcFiles=forceext(m.tcSourceFile,"*")
copy file (m.lcFiles) to (m.lcBackUpDir+"\*.*")
delete file (m.lcFiles)
If one of the file is opened by someone anywhere, I got an error message, which is trapped by our Error Handler...

What would be a safer way to move files to another directory, but not throw an error, if files could not be moved (May be custom notification message)?

Thanks in advance
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform