R
RayV
I've used filesearch on local drives and network drives with no
difficulty in the past but I just tried it using a ftp site and id
doesn't work. No error message just nothing seems to be happening.
This is the code I am running in access 2003 that is being run from a
macro
Dim strPath As String
Dim fs, f, s, respone
strPath = "ftp://123.456.789.1/All%20fFolders%20Current%20and
%20Archive/"
With Application.FileSearch
.LookIn = strPath
.SearchSubFolders = False
.FileName = "*.pdf"
If .Execute > 0 Then
setting = Application.GetOption("Confirm Action Queries")
Application.SetOption "confirm action queries", False
For i = 1 To .FoundFiles.Count
SqlStr = "INSERT INTO MSfolder ( [fname] ) SELECT '" &
Mid(.FoundFiles(i), 44, 11) & "' AS Expr1;"
DoCmd.RunSQL SqlStr
Next i
Application.SetOption "confirm action queries", setting
End If ' databases found
End With ' filesearch
End Function
difficulty in the past but I just tried it using a ftp site and id
doesn't work. No error message just nothing seems to be happening.
This is the code I am running in access 2003 that is being run from a
macro
Dim strPath As String
Dim fs, f, s, respone
strPath = "ftp://123.456.789.1/All%20fFolders%20Current%20and
%20Archive/"
With Application.FileSearch
.LookIn = strPath
.SearchSubFolders = False
.FileName = "*.pdf"
If .Execute > 0 Then
setting = Application.GetOption("Confirm Action Queries")
Application.SetOption "confirm action queries", False
For i = 1 To .FoundFiles.Count
SqlStr = "INSERT INTO MSfolder ( [fname] ) SELECT '" &
Mid(.FoundFiles(i), 44, 11) & "' AS Expr1;"
DoCmd.RunSQL SqlStr
Next i
Application.SetOption "confirm action queries", setting
End If ' databases found
End With ' filesearch
End Function