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

wget with credentials 1

Status
Not open for further replies.

Brycspain

IS-IT--Management
Mar 9, 2006
150
US
I'm trying to use wget to strip a jpeg camera image from an external web page every 30 seconds and I want do this 10 hours per day. I know wget will place the image in the same folder it runs from however, I want to rename the images 1 to 1200 and place them in a folder with the current day's date. The problem is, I have to provide credentials to the web page and I don't know quite how to pass those while using the run method. I’m not very confident in quotations for external commands and have tried several different variations of it. Also, I've searched the web for a day and have come up empty. Can someone point me in the right direction please?

This is what I’ve been working with and I know the syntax is messed up.

Code:
url = "[URL unfurl="true"]http://someurl"[/URL]
wgetcred = "--http-user=username --http-password=password -O webcamview.jpg"
wgetcmd = url & wgetcred

Set ObjShell = WScript.CreateObject("WScript.Shell")
ObjShell.Run("wget" & wgetcmd),4,True
 
What about this ?
Code:
ObjShell.Run "wget " & url & " " & wgetcred,4,True

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top