I am having a problem with the download of web pages via the
WebClient.Downl oadFile function in the specialized VB.Net 2003 I.E.
plug-in I am designing to speed up the work on my latest project.
When I edit the web pages in notepad I see a square wherever I normally
see a carriage return and a line feed when viewing the source in I.E.
How can I make the web pages come down readable so I can easily make my
two manual deletions (different text in each file)?
The code located in modMain.bas (app has no forms) is as follows:
Sub SaveFile
'define variables
Dim clsWebClient As WebClient = New WebClient
Dim intFileNameStar t As Integer
Dim intFilePathStar t As Integer
Dim strFileName As String
Dim strLocalFilePat h As String
Dim strRemoteFilePa th As String
'intialize variables
strRemoteFilePa th = System.Environm ent.GetCommandL ineArgs(1).ToSt ring
intFileNameStar t = (InStrRev(strRe moteFilePath, "/") + 1)
strFileName = Mid$(strRemoteF ilePath, intFileNameStar t)
strLocalFilePat h = Left$(strRemote FilePath, (intFileNameSta rt - 2))
intFilePathStar t = (InStrRev(strLo calFilePath, "/") + 1)
strLocalFilePat h = Mid$(strLocalFi lePath, intFilePathStar t)
'download and store file
clsWebClient.Do wnloadFile(strR emoteFilePath, _
conCfgInfo.strD efaultParentPat h & _
strLocalFilePat h & "\" & strFileName)
'clean up
clsWebClient.Di spose()
End Sub
conCfgInfo.strD efaultParentPat h which contains "D:\Pictures\Bi g Dig\" is
read from Save File.cfg via another sub. The first command line
argument is set by VBS code in Save File.htm when I select the right
click menu Save File... choice in I.E. to the URL of what I right
clicked on. strLocalFilePat h is set to the last subdirectory in the
remote path.
So if strRemoteFilePa th contains
img001.htm gets downloaded to D:\Pictures\Big dig\f073100\img 001.htm in
my local file system.
WebClient.Downl oadFile function in the specialized VB.Net 2003 I.E.
plug-in I am designing to speed up the work on my latest project.
When I edit the web pages in notepad I see a square wherever I normally
see a carriage return and a line feed when viewing the source in I.E.
How can I make the web pages come down readable so I can easily make my
two manual deletions (different text in each file)?
The code located in modMain.bas (app has no forms) is as follows:
Sub SaveFile
'define variables
Dim clsWebClient As WebClient = New WebClient
Dim intFileNameStar t As Integer
Dim intFilePathStar t As Integer
Dim strFileName As String
Dim strLocalFilePat h As String
Dim strRemoteFilePa th As String
'intialize variables
strRemoteFilePa th = System.Environm ent.GetCommandL ineArgs(1).ToSt ring
intFileNameStar t = (InStrRev(strRe moteFilePath, "/") + 1)
strFileName = Mid$(strRemoteF ilePath, intFileNameStar t)
strLocalFilePat h = Left$(strRemote FilePath, (intFileNameSta rt - 2))
intFilePathStar t = (InStrRev(strLo calFilePath, "/") + 1)
strLocalFilePat h = Mid$(strLocalFi lePath, intFilePathStar t)
'download and store file
clsWebClient.Do wnloadFile(strR emoteFilePath, _
conCfgInfo.strD efaultParentPat h & _
strLocalFilePat h & "\" & strFileName)
'clean up
clsWebClient.Di spose()
End Sub
conCfgInfo.strD efaultParentPat h which contains "D:\Pictures\Bi g Dig\" is
read from Save File.cfg via another sub. The first command line
argument is set by VBS code in Save File.htm when I select the right
click menu Save File... choice in I.E. to the URL of what I right
clicked on. strLocalFilePat h is set to the last subdirectory in the
remote path.
So if strRemoteFilePa th contains
img001.htm gets downloaded to D:\Pictures\Big dig\f073100\img 001.htm in
my local file system.
Comment