05-20-2009, 03:33 PM
Code:
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
if fso.fileExists("C:\Folder1\Folder2\file.doc")Then
fso.DeleteFile("C:\Folder1\Folder2\file.doc")
End if
with the help of above code i am able to delete a particular file in a folder.
But suppose in folder2 there are 3-4 doc file with different name and i want to delete them what should i do for this?