Jump to content
Macro Express Forums

FTP File Send (arrives empty)

Recommended Posts



I have the following lines in a script

<FTP SEND FILE Filename="C:\\temp\\macex.txt" Mode="\x00" Log_To="%FTP_transfer%"/>
<DELAY Flags="\x01" Time="5"/>


The log file confirms execution : 

jeudi 22 septembre 2022 09:56:26:463: Line 15: FTP Send File


The variable indicates success :

Name	Value
FTP_transfer	macex.txt - 200 Type set to A
200 PORT command successful


Yet the resulting transfered file is empty :



I've checked the knowledge base : no entries when searching on "FTP"

The user forum doesn't seem to contain anything similar either


It's probably a silly newbie mistake but I can't see where I'm going wrong


Any tips, ideas, recommendations ?






Link to comment
Share on other sites

Hello Yann,


I've not used FTP commands in Macro Express, so I might be on the wrong track.


I checked the Macro Express Help screen on FTP, and I think it says the file contains information you want to transfer. So my guess is that the macro does not modify the file. 


To view the response from the host, you will need to do something like this:


<MESSAGEBOX Caption="Transfer status" Message="%FTP_transfer%" Icon="0"/>


Link to comment
Share on other sites

Is the FTP transfer preceded by FTP log-on, FTP change directory, and so on?  Does the logging indicate success of those commands?


I don't recall that I ever got Macro Express to work reliably for FTP.  Instead, I would build a DOS-style command-line file containing all the FTP commands, and have the macro run the .BAT file (Program Launch).  For a "static" situation, the command-line file can be built ahead of time and re-used every time the macro runs.  For more complicated situations -- a different file name every day, for example -- I would have the macro build the entire .BAT file and then launch the file it had just built.  This worked very reliably.  I backed up hundreds of files per day by having the macro dynamically build hundreds of individual .BAT files and then launch them.



  • Like 1
Link to comment
Share on other sites

There is no free version of MEP to my knowledge. Three is an evaluation period and am sure this would not be a limitation. 

There are help file entries for FTP.

Are you certain the file is greater than zero bytes?

What are your responses?

You might have the permissions on the server to create, but oddly enough, not to modify. 

Have you tried passive mode?

I tried mine but when I do I connect with a 220 but then all commands responses are an invalid handle.

FTP sites have MANY different flavors and parameters. One needs to figure out what the server expects and emulate it. One big one is the TLS (encryption) scheme, which I don't see any settings for in MEP. It might be a "FTP Site" command to set that up after the initial connection. 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...