E
Ed
I'm trying to loop through the files in a folder to use FileCopy. The files
have no dot-extension suffix, and FIleSearch can't see them. If I rename
them with a .doc, it works great. Can someone help me tweak this? Or give
me a better method?
Ed
With fs
.LookIn = strPath & "\MyDocs"
.FileName = "*.doc" 'for no extension,
'I used "*"
If .Execute > 0 Then 'with no extension,
'this drops immediately to End If
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
strName = .FoundFiles(i)
strFName = Right(strName, Len(strName) - 9)
MsgBox strFName
FileCopy strName, strFolder & strFName
Next i
End If
End With
have no dot-extension suffix, and FIleSearch can't see them. If I rename
them with a .doc, it works great. Can someone help me tweak this? Or give
me a better method?
Ed
With fs
.LookIn = strPath & "\MyDocs"
.FileName = "*.doc" 'for no extension,
'I used "*"
If .Execute > 0 Then 'with no extension,
'this drops immediately to End If
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
strName = .FoundFiles(i)
strFName = Right(strName, Len(strName) - 9)
MsgBox strFName
FileCopy strName, strFolder & strFName
Next i
End If
End With