Hi all,
Using VB6, I wrote a vb code that creates ftp batch file and run it as follwoing:
**********************************
Private Sub start_ftp_Click()
' Create the text file that ftp takes the commands from
Open "c:\test.txt" For Output As #1
Print #1, "user myusername"
Print #1, "mypass"
Print #1, "ascii"
'Path on the server
'current path, default path
' Copy the file from pc to server and rename it.
Print #1, "put test.txt ftptest.txt"
Print #1, "bye"
Close #1
' Create a batch file and write the code for FTP
Open "C:\FileName.bat" For Output As #2
Print #2, "ftp -v -n -i -g -s:test.txt myhost-ip"
Close #2
'Run the batch file
Shell "C:\FileName.bat", vbHide
MsgBox "done"
End Sub
****************************************
The script is creating both files but the run doesn't work! when I run the batch file manually it works properly? can any of you help me in this please....
Regards,
Me
Using VB6, I wrote a vb code that creates ftp batch file and run it as follwoing:
**********************************
Private Sub start_ftp_Click()
' Create the text file that ftp takes the commands from
Open "c:\test.txt" For Output As #1
Print #1, "user myusername"
Print #1, "mypass"
Print #1, "ascii"
'Path on the server
'current path, default path
' Copy the file from pc to server and rename it.
Print #1, "put test.txt ftptest.txt"
Print #1, "bye"
Close #1
' Create a batch file and write the code for FTP
Open "C:\FileName.bat" For Output As #2
Print #2, "ftp -v -n -i -g -s:test.txt myhost-ip"
Close #2
'Run the batch file
Shell "C:\FileName.bat", vbHide
MsgBox "done"
End Sub
****************************************
The script is creating both files but the run doesn't work! when I run the batch file manually it works properly? can any of you help me in this please....
Regards,
Me