7 replies
by farzanfar
Public Function FExists(OrigFile As String)
Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
FExists = fs.fileexists(OrigFile)
End Function
by mgilbert
Poster rated this answer.
by farzanfar
Try This :
Public Function FileExists(sFullPath As String) As Boolean
Dim oFile As New Scripting.FileSystemObject
FileExists = oFile.FileExists(sFullPath)
End Function
by mgilbert
Poster rated this answer.
maybe you have some script blocking application running, so that fso doesn't work. why don't you try this:
Dim FileToDelete as string
FileToDelete="C\path1\subpath2\..\file.ext"
if dir(FileToDelete)<>"" then
Kill FileToDelete
end if
Note: the variable "FileToDelete" contains the complete path of the file you want to delete.
by mgilbert
Poster rated this answer.
by mgilbert
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending