FTP Command Log

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
tony_smith
Pro Scripter
Posts: 70
Joined: Wed May 14, 2003 8:25 pm
Location: Vancouver BC Canada

FTP Command Log

Post by tony_smith » Mon Aug 21, 2006 9:40 pm

Is there a way to log FTP session commands to a file? Not the script log, but the actual exchanges between the two servers showing commands sent and the resulting reply.

I can see the commands zipping past in the Msched FTP status window... it is those I wish to log.

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Tue Aug 22, 2006 3:23 am

Just after the FTP command check the FTP_RESULT variable. I'm not sure how you might attain more detail than that. If you need to use several FTP commands, be sure to store the FTP_RESULT in a variable after each use.

let>r=1
FTPGetDirList>.......
let>FTPResult%r%=FTP_RESULT
let>r=r+1
FTPGetFile>.....
let>FTPResult%r%=FTP_RESULT

etc....


Does this help?

User avatar
tony_smith
Pro Scripter
Posts: 70
Joined: Wed May 14, 2003 8:25 pm
Location: Vancouver BC Canada

Post by tony_smith » Tue Aug 22, 2006 2:24 pm

Thanks, I know and use the FTPRESULT. What I need is the log... the series of commands and results that Msched sends and receives as it goes through logon and file download. The FTP command sent returns a value or string from the remote site after each FTP command. For instance FTPGetFile has to send several FTP commands to accomplish what is does.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Aug 22, 2006 2:53 pm

Go download the free ftp proxy program from:
http://www.security.nnov.ru/soft/3proxy/

Run it like this:

ftppr.exe -lc:\log.txt

Modify your FTP calls to use 127.0.0.1 for the server address. Username becomes user@serveraddress, e.g:

FTPGetFile>127.0.0.1,[email protected],password,21,....etc....etc

Now run as usual. c:\log.txt now contains complete session log - contains all FTP commands that have passed back and forth ....
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
tony_smith
Pro Scripter
Posts: 70
Joined: Wed May 14, 2003 8:25 pm
Location: Vancouver BC Canada

Post by tony_smith » Tue Aug 22, 2006 4:14 pm

Thank you Marcus!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts