Create a BODS job with the following script in it.

exec(‘E:\FTP.bat’,’E:\ABC.txt’,2);

PS:: The 2nd argument you can dynamically specify file name using variables or you can hard code it here and pass it as a argument to the FTP script.

The contents inside the batch file ‘FTP.bat’ is given below

@ECHO OFF
:: Create the temporary script file
> script.ftp ECHO open XXX.com
>>script.ftp ECHO USER username
>>script.ftp ECHO password
>>script.ftp ECHO cd /test
>>script.ftp ECHO put %1
>>script.ftp ECHO bye

FTP -v -n -s:script.ftp

Further reading for the preparation of the script is http://www.robvanderwoude.com/ftp.php

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply