HTTrack Website Copier
Free software offline browser - FORUM
Subject: Re: Dynamic portion of WEBSITE
Author: Gadrin
Date: 11/18/2008 16:32
 
First make a copy of your mirror, unless you don't mind downloading it all
again :)

Save the following to a file called  Rewrite-AdTech.vbs

const ForReading = 1, ForWriting = 2
dim fso, f, daHTML, filespec, outfile

'	get the filename from the command line...
filespec = WScript.Arguments.item(0)

'	now take the input file and read it into a variable the close the file...
Set fso = CreateObject("Scripting.FileSystemObject")
Set f   = fso.OpenTextFile(filespec, ForReading)

daHTML  =  f.ReadAll
f.Close()

'	now take the HTML and replace all the adtech urls...
daHTML = Replace(daHTML, <http://adserver.adtech.de>, "")

'	now open the same file for output to place all the changes into...
Set outfile = fso.CreateTextFile(filespec, True)

'	write out the new file and close it up...	
outfile.write(daHTML)
outfile.Close()

'	close all the object handles...
Set f = Nothing
Set fso = Nothing
Set outfile = Nothing

'msgbox "All Done",,"VBScript"


--------------------------------

Then go to the top level folder where your mirror is.
Open a DOS box.

Type:

for /R . %a in (*.htm,*.html) do P:\VBS\Rewrite-AdTech.vbs %a

Change the P:\VBS\ to which ever folder you saved the .vbs file to.

This will loop thru all the folders/subfolders in that mirror and send each
.htm or .html file to the .vbs script and replace the contents of each,
removing the <http://adtech> with nothing.

Then try opening your local files, see if it works.

>
 
Reply Create subthread


All articles

Subject Author Date
Dynamic portion of WEBSITE

11/18/2008 10:34
Re: Dynamic portion of WEBSITE

11/18/2008 14:26
Re: Dynamic portion of WEBSITE

11/18/2008 16:17
Re: Dynamic portion of WEBSITE

11/18/2008 16:32
Re: Dynamic portion of WEBSITE

11/18/2008 16:34
Re: Dynamic portion of WEBSITE

11/18/2008 18:35
Re: Dynamic portion of WEBSITE

11/19/2008 06:38
Re: Dynamic portion of WEBSITE

11/20/2008 03:29




2

Created with FORUM 2.0.11