Finding out if a file exists 
Author Message
 Finding out if a file exists

I need to know if a certain file exists in the file system then I need to
delete it. How can I do that.
Thanks in advance.


Sat, 08 May 2004 06:21:45 GMT  
 Finding out if a file exists
in vbs:

yourfile = " ...... "
Set fso = CreateObject("Scripting.FileSystemObject")

If (fso.FileExists(yourfile)) Then
 Set oFile = fso.GetFile(yourfile)
 oFile.Delete
End If

 - Mitch

Quote:

> I need to know if a certain file exists in the file system then I need to
> delete it. How can I do that.
> Thanks in advance.



Sat, 08 May 2004 06:46:07 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HowTo: Find out if File Exists

2. How do I find out if a file exists on the server side

3. files exists or not - says that it doesn't exist

4. Session Variable Time-outs

5. PS Fonts, exist but not found

6. Find out if table exist with vbs

7. How to find out if the field exists in a recordset

8. Finding if a Registry branch exists

9. Finding if a Registry value exist

10. Finding out if a certain value exists in an Array

11. File System Object & File Exists

12. Create a new .wav file from an existing .wav file based on the date

 

 
Powered by phpBB® Forum Software