• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1965
  • Last Modified:

Using DTS execute process task to run ftp.exe, how can I get the ftp log to record in a file?

I have some applications that use ftp to retrieve data in an SQL job.  Everything works except I can't figure out how to get ftp to log to a text file.  It can be done manually, but not when executed from an execute process task in the DTS package.  I've done this on an AS/400 many times.  I know it can be done, just don't know how.

I prepare a txt file from a vb script preceeding the execute process task.  The execute process task win32 process is: ftp.exe,  the parameters are: -s:c:\ftpCommands.txt

Where do I put the >c:\ftplog.txt redirect command to capture the log?
1 Solution
Anthony PerkinsCommented:
Instead of executing ftp.exe, consider executing cmd.exe and placing the following in the parameters:
/c "ftp.exe -s:c:\ftpCommands.txt > c:\ftplog.txt"
JayNicholsAuthor Commented:
Thanks for the quick response.  Worked great.  It immediately showed me my problem (a file name with a space in the middle).
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now