Micro Focus QTP (UFT) Forums

Full Version: How can we copy the text file to ftp server?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can we copy the text file to ftp server?
You can create a text file with the ftp commands in order of execution...
http://support.microsoft.com/kb/96269

myftpcommands.txt
Code:
open ftp.mysite.com
user
password
hash
bin
put file1.txt
quit

Then you can call a shell execute command in QTP.
http://msdn.microsoft.com/en-us/library/...S.85).aspx
Code:
dim objShell
set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "ftp.exe", "myftpcommands.txt", "", "open", 1
set objShell = nothing