VBScript

Posted by: joslaps

VBScript - 05/06/08 11:21 AM

What's wrong with this script.
I have a error message.

' Suppression des fichiers
set fs = CreateObject("Scripting.FileSystemObject")
x = ("c:/Donnees/da/da2da4/transfert/da2revisees/*")
set a = fs.deleteFile(x)

Thanks!
Posted by: Anonymous

Re: VBScript - 05/06/08 04:22 PM

Hi,
You need to declare your variable first. You need to release it when you are done.

Code:
Dim FSO 
Set FSO = CreateObject("Scripting.FileSystemObject")
x = ("c:\testfile*.ZIP")
FSO.deleteFile(x)
set FSO = nothing
Hope this helps
Maxime
Team OL