filesearch on FTP site

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
 
A

Albert D. Kallal

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.

The problem here is that FTP has nothing to do with windows, is not a
windows networking protocol.

To use file search that directory has to be part of your network. (it's not
even clear if the system you're talking to is a windows based system or that
system is even connected to and part of your windows workgroup - it would
have to be).

FTP is not the same as windows networking, nor is it a networking protocol
that can read and write files. FTP can download a file, or a better term is
transfer a file. But to use actuall directories and update files in a
directory is a completely different system, completely different technology,
and has nothing to do with windows file system.

To get a list of files and directories from an FTP system you'll have to use
FTP commands. You can't use windows networking at all, as I said above it's
completely unrelated, completely different technology, and completely a
different system that has no a relationship to the windows networking
system.

There's a nice FTP library available for download here and it does have some
commands to actually grab lists of files. You can find that library here:

http://www.mvps.org/access/modules/mdl0037.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top