21/05/2020, 08:10
Salt Okunur Dosyaları, Gizli Dosyaları, Sistem Dosyalarını Eklemek
21/05/2020, 10:32
ozanakkaya
21/05/2020, 10:37
accessman
Public Function FileExists(ByVal strFile As String, Optional bFindFolders As Boolean) As Boolean
Dim lngAttributes As Long
If bFindFolders Then
lngAttributes = (lngAttributes Or vbDirectory) 'Include folders as well.
Else
'Strip any trailing slash, so Dir does not look inside the folder.
Do While Right$(strFile, 1) = "\"
strFile = Left$(strFile, Len(strFile) - 1)
Loop
End If
'If Dir() returns something, the file exists.
On Error Resume Next
FileExists = (Len(Dir(strFile, lngAttributes)) > 0)
End Function
21/05/2020, 10:40
ozanakkaya
Function FileExists(ByVal strFile As String, Optional bFindFolders As Boolean) As Boolean
Dim lngAttributes As Long
lngAttributes = (vbReadOnly Or vbHidden Or vbSystem)
If bFindFolders Then
lngAttributes = (lngAttributes Or vbDirectory)
Else
Do While Right$(strFile, 1) = "\"
strFile = Left$(strFile, Len(strFile) - 1)
Loop
End If
On Error Resume Next
FileExists = (Len(Dir(strFile, lngAttributes)) > 0)
End Function
Dim lngAttributes As Long
lngAttributes = (vbReadOnly Or vbHidden Or vbSystem)
If bFindFolders Then
lngAttributes = (lngAttributes Or vbDirectory)
Else
Do While Right$(strFile, 1) = "\"
strFile = Left$(strFile, Len(strFile) - 1)
Loop
End If
On Error Resume Next
FileExists = (Len(Dir(strFile, lngAttributes)) > 0)
End Function
21/05/2020, 10:40
accessman
teşekkürler