I wrote a VB application for creating a .bat file by using the "Open File For Output As" method.

In the created .bat file an ftp function, ftp -s:TRAN.TXT, is called. I tried both Shell "ftp -s:TRAN.TXT" and RetVar = Shell ("c:\TRAN.TXT"), respectively, in the VB application (as the last line of code) but neither worked.

I checked the location of the TRAN.TXT file, which was sitting in c:\, the same path as the created .bat file.

The .bat file was created correctly because if the .bat file was executed manually, the ftp -s:tran.txt functiion would then be called and performed properly.

Thanks for anyone who can help me out.