Jump to content

Auto export, then ftp?


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

Recommended Posts

  • Newbies

I am using FM6 on Windows XP.

I want to run a scheduled script once each day to export records from FM in csv format, and then upload the csv file via ftp. I have a script in FM to do the export, but is there any way to make it automatically run at a set time each day, and then ftp the csv file? I found a way to do it with applescript on a Mac, but I need it to run on a windows machine.

Thanks,

Scott

Link to comment
Share on other sites

Hi, Scott, and welcome to the Forums!

Let me assume that you have Filemaker installed at C:Program FilesFilemakerFilemaker Pro 6 and that the .csv file you want to send will always be located at C:thisFolderthisFile.csv.

In your script, add the step Send Message. In the options for that step, specify the text: cmd /c "ftp -s:"c:program filesfilemakerfilemaker pro 6ftpScript.txt"".

Now create a plain text file at c:program filesfilemakerfilemaker pro 6ftpScript.txt. This file should read:

open <the desired FTP address>

<username>

<password>

cd onetwo

send "C:thisFolderthisFile.csv"

bye

Of course, substitute appropriate values for the text in angle brackets. Also, the line cd onetwo is a simple change directory; if the directory you want to drop the file into is actually usersuserfiles (on the ftp host), then this line should read cd usersuserfiles.

What happens is FM calls the command-line ftp console and directs it to process the commands found in the file ftpScript.txt. The contents of that text file should be the ftp commands you would type were you actually interfacing through a console.

Bear in mind, this method may send anti-virus and firewall programs into fits.

HTH,

Jerry

Link to comment
Share on other sites

Assuming your FM file is not always open, not within Filemaker, there's not.

BUT -- if you can run the script from a different file, then you could make an .fp5 file that has just this one script, and set the file to run this script upon open. (Edit > Preferences > Document > Perform Script) Then use Windows Task Manager to open this file at the desired time each day.

J

Link to comment
Share on other sites

This topic is 6955 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.