Jump to content

Send Message - CMD FTP Upload?


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

Recommended Posts

Hi guys,

I have a script that is basically going to export records to a pre-defined file, and then using the send message access DOS CMD prompt to open up ftp and upload the files.

I guess my first question is this:

with the send message can you only put one line of command, and therefore should I try to create a batch file to execute from that one command?

If not, here is pretty much what i want to send...

command /c

ftp

open

{site}

{login}

{password}

put g:ftp uploadstransferfilemaker.mer

bye

exit

I can successfully get command/c ftp to work, but am figuring out how to execute the rest of it.

Link to comment
Share on other sites

Yes, you are limited to sending one command to FileMaker using send message. As you suggested, use a batch file to store your commands and then call the batch file with the send message command.

You can get arguments in your batch file using %1, %2, etc. This way, you can pass the data in from FileMaker using a calc field:

> myScript.bat login password

Be ware that you don't receive a result when you use send message. One work around for this is to have your batch file write to a text file which you could then import into FileMaker. The problem with this approach is that FileMaker handles the send message step asynchronously, meaning that it doesn't wait for the send message step to finish before moving onto the next script step. If you have an import step immediately after the send message, there is a good chance that the import file will not have been populated by the time that FileMaker imports it.

Link to comment
Share on other sites

This topic is 6545 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
 Share

×
×
  • Create New...

Important Information

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