Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Auto export, then ftp?

Featured Replies

  • 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

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

  • Author
  • Newbies

Wonderful, thank you Jerry. Is there any way to get that script to run once each day at a set time?

Thanks,

Scott

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.