Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute Process Task - FTP.EXE

Status
Not open for further replies.

jpicks

MIS
Oct 11, 2002
158
0
0
US
Hi all. I am attempting to use an Execute Process Task to have the windows ftp client send a file to another server.

Here's what I've got so far:

Under Execute Process Task Properties
[ul]
[li]I set win32 process = [ignore]C:\WINNT\SYSTEM32\FTP.EXE (also works if you just enter ftp)[/ignore]
[/li]
[li]In the parameters line I entered:
[ignore]-s:"\\Server\FileTransfers\FTP_Commands.txt"[/ignore]
[/li]
[/ul]

The -s switch specifies a text file that contains all of the ftp commands.

This all works fine, but I hit a road block when I try to adding some logging functionality.

What I want to enter in the parameters line is:
[ignore] -s:"\\Server\FileTransfers\FTP_Commands.txt" > "\\Server\ftp.log"[/ignore]

Adding [ignore]> "\\Server\ftp.log"[/ignore] should write the output of the command line to a file. The command works fine when I run it manually from a command line, but gives me an error when I try to run it from within the Execute Process Task.

Any help or suggestions you can offer would be greatly appreciated!

 
You can accomplish what you need by creating a DOS batch file that reads ...

Code:
FTP -s:"\\Server\FileTransfers\FTP_Commands.txt" > "\\Server\ftp.log"

and execute the batch file from DTS. It isn't graceful, but I think it will do the trick. Good luck!

--John [rainbow]
-----------------------------------
Behold! As a wild ass in the desert
go forth I to do my work.
--Gurnie Hallock (Dune)
 
Thanks for the replies!

John your suggestion works great. Too bad I can't simply add the extra command for the output file to my original approach.

Nigelrivett, your sp is something I will definitely be able to utilize.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top