Delete Files in Excel Visual Basic?

  Desert Andy 10:10 25 Mar 2005

I have written the following code to back up data from one folder to another.
Set fs = CreateObject("Scripting.FileSystemObject")
fs.copyfolder "c:\79 Operations Folder", "c:\Operations Back Up\Back Up 1\79 Operations Folder"
It seems to work 90% of the time, however, occassionally i have problems with it since it says I can't read the files. If I delete the old files first, it works fine. Is there a way to delete the files in the '79 Operations Folder' before i copy across back up files using visual basic in Excel?


  VoG II 10:14 25 Mar 2005

The command is

Kill <filename>

where <filename> is the full path to the file.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

iPhone X review

How to find a font: Discover the name of a typeface with these apps

The best iPhone for 2017

Comment créer un compte PayPal pour payer en ligne ?