Jump to content

Seeking file/ftp/http plugin(s)


This topic is 5487 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I'm still a newbie at using FileMaker, and I'm definitely having some trouble finding the right plug-ins to handle these tasks:

(1) Download FTP files (fine, I can do this with MooPlug, if I know the exact path and file name).

(2) Get file-dates and directory listings for FTP sites (MooPlug can't do it; after spending an hour with FTPit Pro, I'm confident that it will take many more hours to decipher its sparse documentation, to see if it can actually meet this set of needs -- but it appears that it can't handle other functionality I need).

(3) Download files via http (MooPlug can apparently do this for certain static files, but it won't work for my needs, in part because it doesn't allow for specification of a destination path or file name; it just drops the file into the TEMP directory using the URL as the file name, which simply won't work for dynamic URLs).

(3) Get file-dates and file-size (HEAD info) for http files (I can't find any plug-in that promises this; I suppose it might turn out that the data isn't accurate or complete anyway).

(4) Access local files, including getting file dates and sizes, directory listings, etc. (I tried the Troi and 24U file products, but despite "trial" and "shareware" references, neither would function without paid registration.) I'm using MooPlug to get a basic list of files in a directory, but without the file-size and date information which I absolutely need.

(5) Unzip local files (MooPlug seems to do this fine, at least to unpack a file into the current directory).

I don't mind paying for a tool that meets some of my needs. However, thus far none of the plug-in makers have persuaded me that they have working plug-ins which would actually meet any of my needs!

The http download functionality seems to be a huge problem -- I cannot find ANY plugin that promises this functionality (other than MooPlug, which promises some very basic functionality but clearly can't meet my needs). The other functions (ftp & file) seem to require two separate plug-ins.

Absolutely the worst part of this is that I've downloaded and tried to use a half-dozen different plug-ins, but these things are so poorly documented that it's almost impossible to figure out what they might actually be able to do. One plug-in maker wrote back, acknowledging that their product was released without any documentation!

What confuses me is that I don't think my needs are unusual -- I need to import data which is updated, but not on a fixed schedule, from multiple sources. I need to check remote servers (ftp and http) to see if there are new versions of any of the data files I am using; if there are new versions, I need to download the new version, unzip it, and import it. While it's probably unlikely that someone else would need to access remote files using both ftp and http, I certainly don't think any other aspect of the project is unusual. And yet it appears that this need is NOT met by any single plug-in or even a pair of plug-ins.

I would appreciate any specific advice or direction. Thanks!

Edited by Guest
Link to comment
Share on other sites

I'm still a newbie at using FileMaker, and I'm definitely having some trouble finding the right plug-ins to handle these tasks:

(1) Download FTP files (fine, I can do this with MooPlug, if I know the exact path and file name).

I'm going to add Moo_FTPList to the next version of MooPlug.

(2) Get file-dates and directory listings for FTP sites (MooPlug can't do it; after spending an hour with FTPit Pro, I'm confident that it will take many more hours to decipher its sparse documentation, to see if it can actually meet this set of needs -- but it appears that it can't handle other functionality I need).

See Above

(3) Download files via http (MooPlug can apparently do this for certain static files, but it won't work for my needs, in part because it doesn't allow for specification of a destination path or file name; it just drops the file into the TEMP directory using the URL as the file name, which simply won't work for dynamic URLs).

I'm going to have a look at that for you now :-)

(3) Get file-dates and file-size (HEAD info) for http files (I can't find any plug-in that promises this; I suppose it might turn out that the data isn't accurate or complete anyway).

I'll take a look into that.

(4) Access local files, including getting file dates and sizes, directory listings, etc. (I tried the Troi and 24U file products, but despite "trial" and "shareware" references, neither would function without paid registration.) I'm using MooPlug to get a basic list of files in a directory, but without the file-size and date information which I absolutely need.

MooPlug 0.4.8 (soon to be released) already has a Moo_FileInfo function which can retrieve file versions, created and modified dates and file size :-)

(5) Unzip local files (MooPlug seems to do this fine, at least to unpack a file into the current directory).

The Moo_ZipExtract function is going to have some work done on it soon, so more options can be specified, eg where to extract, extract files matching a pattern etc

Hope that answers some of your questions and MooPlug will be able to be the solution to your problems.

Adam

Link to comment
Share on other sites

  • 3 weeks later...

Can anyone tell me if this plugin will allow a person accessing a database published on the web (via FMS 10 running a mac) to download and up load files? Most likely to and from an FTP site. thanks

BTW downloaded the plugin but has .fmx extension is this a PC only plugin?

Edited by Guest
Link to comment
Share on other sites

You do not really need a plug-in on Macs, because FileMaker can run AppleScript, and AppleScript can run a shell command, via do shell script. The form for download is (pseudo code):D

do shell script "curl 'ftp://user:[email protected]/path/file.ext' -o ~/Desktop/file.ext"




The above explicitly names the file whatever you say. Alternatively, you can go to where you want it to download to, and curl will name the file the same as the file it downloads. (That's the letter O, not a zero, 0).




do shell script "cd ~/Desktop; curl -O 'ftp://user:[email protected]/path/file.ext'"


For upload:




do shell script "curl -T 'path to file.ext' 'ftp://user:[email protected]/path/'"

-- upload to directory, curl will append specified file name


Notice the single quotes around the paths. This is required by Unix if there are any spaces or other special characters in the path. 



To "list files" in a directory, use the -l option instead of -T or -o. Look at the man (manual) page for curl, lots of options (too many :-).



For interaction, ie., choosing the file to upload, you will need to use AppleScript itself, which uses a different syntax for its paths. It is easy enough to convert back and forth to Unix paths; there is a command to do that. Example:




set mac_file to choose file

set unix_file to quoted form of POSIX path of mac_file

do shell script "curl -T " & unix_file & " ftp://user:[email protected]/path/"

Notice the space between the objects, to separate them.

But yeah, it would be more convenient to do cross-platform with a single plug-in, using the same code. Because really it's the same thing.

Edited by Guest
Link to comment
Share on other sites

  • Newbies

http://www.cnsplug-ins.com

FTPit plug in

Works great for my company's EDI needs. Approximately 2400 file transfers per day, combined incoming and outgoing. Been using it on an automated client for 5+ years. Local and remote file handling, which we need, since we handle archiving the files at the remote site.

In addition, the developer is quite responsive and knowledgeable.

Link to comment
Share on other sites

  • 1 month later...

I have recently been doing FTP on Windows XP and Vista without *any* plugins. I've also used FMP on Mac but it's been a few years.

Note that you can also use cURL on Windows platform -- previous message on this was excellent but did not address cURL use on PC's.

It's free and runs as a DOS command, and hence, can be called from Filemaker and runs under any Windows version -- just download it from http://curl.haxx.se/ -- this can also be used to post HTTP forms, including file uploads, and it handles cookies so thoroughly simulates a browser interaction/session. It *is* possible to get data back from cURL on Windows, either by IO redirection to a file then imported into FMP, and thereby, tell if uploads succeeded, e.g. using dos ERRORLEVEL parameter. If cURL is stored in a container, a solution can probably automatically install it if it doesn't already exist; if coupled with logic to check which platform it's on, you should be able to use cURL in a mixed Mac/PC environment. The only caveat here is for a PC install, it also needs a free open ssl library but *ONLY* for https:// requests. Links to this are on cURL site link above.

Alternately, to get data back from cURL on PC's, use a method I've come up with, use of CLIP.EXE (append | CLIP to any DOS command). This will pipe DOS command's output to the clipboard, where it can be read by Filemaker. CLIP.EXE comes with Vista and can be added to XP (free download). This also has the advantage of allowing data to be brought into FMP that has line breaks, but not create new records for each line break.

--------------------------------------------

Alternately, use Windows built-in ftp command.

Initially this might seem daunting, because the DOS ftp command doesn't have switches like cURL to specify username, password, filename to upload or download, etc -- but it *can* accept *all* this input from a data file -- it just reads data file as though you were typing the commands, so it's extremely flexible.

So to use built-in ftp command on Windows XP, Vista, and probably earlier versions of Windows, is a two-step process. Below myusername is ftp server username, mypassword is ftp server password. C:ftpcmd.dat is the data file fed to DOS's ftp command. C:filetoupload.ext is local filepath to file to upload. & operator stacks multiple DOS commands on same line. So you execute two successive send events. Multiple echo commands are employed because each echo ends with a carriage return which is necessary in the data file, and difficult to generate with Filemaker Pro alone without plugins (e.g., using export field, they are obliterated). Note that you could use this method to ftp many files in a single send event.

1.) Build c:ftpcmd.dat list of commands for DOS ftp command to process by sending this event:

"CMD /C echo myusername > C:ftpcmd.dat&echo mypassword >> C:ftpcmd.dat&echo bin>> C:ftpcmd.dat& echo cd directoryname >> C:ftpcmd.dat&echo put C:filetoupload.ext>> C:ftpcmd.dat&echo quit>> C:ftpcmd.dat"

2.) Then send another event to process these commands:

"cmd /K ftp -d -s:C:ftpcmd.dat myftpsite.com"

Change above to CMD /C if you want DOS Window to close when finished (/K switch useful for debugging).

You could probably stack both of these into one command with another &, thereby, sending only one event. If you don't want your username and password to remain in ftpcmd.dat, simply add "& del c:ftpcmd.dat" to the second command above, for security.

There is an upper limit for how long a DOS command can be issued, so if hundreds or thousands of files are being FTP'd, multiple send events may be required.

Link to comment
Share on other sites

This topic is 5487 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.