Login | |
|
 |
Secure Site? - 5/30/2005 12:37:58 PM
|
|
 |
|
| |
TNO
Posts: 1397
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
|
The following script was designed to copy a group of files daily from a secure website, when its run I'm told that the files are not found. Is this due to the fact that this is https://? How can I work around this? The site requests Identification but its not required. Is there a way to attach a signature or some alternative? Set fso = CreateObject("Scripting.FileSystemObject") set WshShell = WScript.CreateObject("WScript.Shell") dim MAL,LUBF,FLUBF,TE,CMR,DOCDEMAND,DASFFSN,STOCKDEMAND,RUDEMAND,DASFDOC,File,fldr,subfldr,dest,DiffADate,Julian,strDesktop 'Julian Date DiffADate = DateDiff("d", "1-Jan-" & Year(Now), Now) Julian = Right(Year(Now),1) & DiffADate + 1 '////////////////////////////////////////////////////////////////////////////////////// 'Create Folder on Desktop "Reports/Julian Date/ strDesktop = WshShell.SpecialFolders("Desktop") fldr = strDesktop & "\Reports" subfldr = strDesktop & "\Reports\" & Julian If Not fso.FolderExists(fldr) Then fso.CreateFolder(fldr) End If If Not fso.FolderExists(subfldr) Then fso.CreateFolder(subfldr) End If '///////////////////////////////////////////////////////////////////////////////////////// MAL = "https:\\" LUBF = "https:\\" FLUBF = "https:\\" TE = "https:\\" CMR = "\\Hqbnw2p019\" DOCDEMAND = "https:\\" DASFFSN = "https:\\" STOCKDEMAND = "https:\\" RUDEMAND = "https:\\" DASFDOC = "https:\\" '////////////////////////////////////////////////////////////////////////////////////// 'Make sure Files Exist Function NoFile(File) WScript.echo "File: " & File & " Not Found!" WScript.quit End Function If Not fso.FileExists(CMR) Then NoFile(CMR) ElseIf Not fso.FileExists(LUBF) Then NoFile(LUBF) ElseIf Not fso.FileExists(FLUBF) Then NoFile(FLUBF) ElseIf Not fso.FileExists(TE) Then NoFile(TE) ElseIf Not fso.FileExists(MAL) Then NoFile(MAL) ElseIf Not fso.FileExists(DOCDEMAND) Then NoFile(DOCDEMAND) ElseIf Not fso.FileExists(DASFFSN) Then NoFile(DASFFSN) ElseIf Not fso.FileExists(STOCKDEMAND) Then NoFile(STOCKDEMAND) ElseIf Not fso.FileExists(RUDEMAND) Then NoFile(RUDEMAND) ElseIf Not fso.FileExists(DASFDOC) Then NoFile(DASFDOC) Else Wscript.echo "An unknown error has occurred." WScript.quit End If '////////////////////////////////////////////////////////////////////////////////////// 'Copy Files into Folder With fso.CopyFile MAL, subfldr,True LUBF, subfldr,True FLUBF, subfldr,True TE, subfldr,True CMR, subfldr,True DOCDEMAND, subfldr,True DASFFSN, subfldr,True STOCKDEMAND, subfldr,True RUDEMAND, subfldr,True DASFDOC, subfldr,True End With '////////////////////////////////////////////////////////////////////////////////////// WScript.quit
_____________________________
To iterate is human, to recurse divine. -- L. Peter Deutsch
|
|
| |
|
|
|
 |
Re: Secure Site? - 6/1/2005 12:24:50 PM
|
|
 |
|
| |
TNO
Posts: 1397
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
|
Hmm, ok then. What would the basic syntax be to copy a file from a website? Is there a method in the FileSystemObject for this?
|
|
| |
|
|
|
 |
Re: Secure Site? - 6/1/2005 4:47:27 PM
|
|
 |
|
| |
TNO
Posts: 1397
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
|
I've just recently come across the MSXML2.XMLHTTP object. Does anyone have a good reference site for this subject in relation to my question?
|
|
| |
|
|
|
 |
Re: Secure Site? - 6/1/2005 10:18:36 PM
|
|
 |
|
| |
TNO
Posts: 1397
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
|
I've tried pursuing the following method for downloading a file, but am coming across some difficulties, any suggestions? Dim wsh, fso, ts Const TEMP_FILE = "C:\~temp.wsf" Set wsh = CreateObject("Wscript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") Set ts = fso.OpenTextFile(TEMP_FILE, 2, True) ts.WriteLine "<job>" ts.WriteLine "<script language=""vbscript"" " ts.WriteLine "src=""http://www.ericphelps.com/image/logo1.gif""/>" ts.WriteLine "</job>" ts.Close wsh.Run "cscript.exe " & TEMP_FILE, 0, True fso.DeleteFile TEMP_FILE
|
|
| |
|
|
|
 |
Re: Secure Site? - 6/2/2005 10:54:26 AM
|
|
 |
|
| |
TNO
Posts: 1397
Score: 16
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
|
These files are on a government Logistics site. I have no control over these files. With a web browser I navigate straight to the file. I'm prompted with a request for identification https:// but none is required.
|
|
| |
|
|
|
|
|