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

Is WSH robust enough for this job?

Status
Not open for further replies.

PhillipFoster

Technical User
May 23, 2002
41
GB

OK, dilettante's reply in this question thread329-406772 has started me thinking.

We FTP faxes from a remote server, print them and then key the data into an Access database. Currently we use FlashFXP to download the files.

I've just automated the printing side of the process with a script (thanks in large to dilettante's help) and now I'm thinking that I could automate the whole process using the FTP command in the script.

Is WSH robust enough or do you think I should be barking up a different tree?

Anyone got any examples of using FTP from a script?

Regards - Phil.
 
Well gosh PhillipFoster, I hope I was of some help. Looking back at that thread I see it was during my "only 20 Tek-Tips minutes per day" period and my responses were pretty curt. Almost more like potshots than help, sorry about that.

What do you want to handle differently in WSH from what you're doing in bat/cmd files? You could always run FTP.EXE with -s from a WSH script just like in a batch file. And a WSH script can easily enter things into an Access database.

I'm not too sure about a WSH "reading" a fax to get the data though. ;-)

You'd need some fax/image OCR software or something, then have to parse what you want out of the output text file.

I think I'm missing something.
 
Maybe like this?
Code:
'Automate FTP.EXE via FTP script file.
Option Explicit
Dim objShell

Set objShell = CreateObject("WScript.Shell")
objShell.Run "cmd.exe /c ""ftp.exe -s:AutoFTP.ftp"" >AutoFTP.log"
Set objShell = Nothing
Here
Code:
AutoFTP.ftp
is your FTP command file. On Win9X use command.com instead of cmd.exe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top