M
Manuel
Hi,
I already created a Function that is searching files, using
"Application.Filesearch" (see below).
But this does function not "see" HIDDEN Files (for expample a Word Document
with a setting "Hidden=True").
But I need also to get a TRUE of hidden files.
How to do that?
Greetings Manuel
Dim fs As Object
Dim i As Integer
Dim strFile As String
Dim strPath As String
strFile = ""
strPath = ""
If Not gbNull(sFilePath) Then
Set fs = Application.FileSearch
With fs
strFile = Mid(sFilePath, InStrRev(sFilePath, "\") + 1)
strPath = Left(sFilePath, Len(sFilePath) - Len(strFile) - 1)
.LookIn = strPath
.FileName = strFile
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) > 0 Then
mCheckPhysicalFile = True
Else
mCheckPhysicalFile = False
End If
End With
Else
mCheckPhysicalFile = False
End If
I already created a Function that is searching files, using
"Application.Filesearch" (see below).
But this does function not "see" HIDDEN Files (for expample a Word Document
with a setting "Hidden=True").
But I need also to get a TRUE of hidden files.
How to do that?
Greetings Manuel
Dim fs As Object
Dim i As Integer
Dim strFile As String
Dim strPath As String
strFile = ""
strPath = ""
If Not gbNull(sFilePath) Then
Set fs = Application.FileSearch
With fs
strFile = Mid(sFilePath, InStrRev(sFilePath, "\") + 1)
strPath = Left(sFilePath, Len(sFilePath) - Len(strFile) - 1)
.LookIn = strPath
.FileName = strFile
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) > 0 Then
mCheckPhysicalFile = True
Else
mCheckPhysicalFile = False
End If
End With
Else
mCheckPhysicalFile = False
End If