View Single Post
Old Mar 23rd, 2008, 12:43 PM   #1
Abyss
Newbie
 
Join Date: Apr 2005
Posts: 18
Rep Power: 0 Abyss is on a distinguished road
FileSystemObject

Hello All, I was wondering if someone could help explain this piece of VB code to me? I've read about the FileSystemObject online but the 'rfs' function is a bit confusing. Any help is appreciated.

Thanks

Function rfs(filespec)
  Dim fso, Msg
  Set fso = CreateObject("Scripting.FileSystemObject")
  If (fso.FileExists(filespec)) Then
    Msg = "YES"
  Else
    Msg = "NO"
  End If
  rfs = Msg
End Function
Abyss is offline   Reply With Quote