Advertisement
ASP_Volume3 Files/ File Controls/ Input/ Output #44972

Check if File Exists - Including Hidden Files

Simple function to check if file exists. Detects Normal & Hidden files. Improvement of code from Greg G., and incorporating a suggestion by Larry Rebich.

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
Public Function FileExists(strFile as String) As String
 On Error Resume Next 'Doesn't raise error - FileExists will be false
      'if error occurs
 'a valid path would be someting like "C:\Windows\win.ini" - Full path
 'must be specified
 FileExists = Dir(strFile, vbHidden) <> ""
 
End Function

Upload
Upload
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine