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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to check if FTP passed or failed in VBS

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am having a .VBS file where ia m initiating an FTP process.From inside
the vbs code how can i check for the sucess or faliure of the FTP process.I
am doing the following
Set objWshShell = WScript.CreateObject("WScript.Shell")

x = objWshShell.Run(--full ftp command--)
i tried checking value of x but it is always 0 regarless of whether FTP
failed or passed.
Also is there any way i can find out whether a file has been uploaded to
the FTP site or not by checking the presence of file on FTP site.How can
presence of the file be checked on the FTP site ?

Thanks in Advance
Sohail
 
object.Run(strCommand, [intWindowStyle], [bWaitOnReturn])

The WindowStyle is an integer, like 0 for "hide" and 1 for "normal." WaitOnReturn is boolean.

Use:

lngResult = objWshShell.Run({ftp command string}, 1, True)

Then you'll get the result.

See the online Help for WSH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top