I have the following code that searches a directory and lets me know what files are in it.
With Application.FileSearch
.NewSearch
.LookIn = "C:\Documents and Settings\fontanas\Desktop\Pr Plans\"
.SearchSubFolders = True
.Filename = "*"
.TextOrProperty = "*"
.MatchAllWordForms = True
If .Execute() > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no files found."
End If
End With
It works fine. I am going to open each file and import them into access. I know how to do that part.
I would like to move the file to another directory after i imported the data and closed it. The new directory is located at -
"C:\Documents and Settings\fontanas\Desktop\Pr Plans\Imported"
Any Ideas About The Syntax?
With Application.FileSearch
.NewSearch
.LookIn = "C:\Documents and Settings\fontanas\Desktop\Pr Plans\"
.SearchSubFolders = True
.Filename = "*"
.TextOrProperty = "*"
.MatchAllWordForms = True
If .Execute() > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no files found."
End If
End With
It works fine. I am going to open each file and import them into access. I know how to do that part.
I would like to move the file to another directory after i imported the data and closed it. The new directory is located at -
"C:\Documents and Settings\fontanas\Desktop\Pr Plans\Imported"
Any Ideas About The Syntax?