________________________________
Create a text file called c:\GetWebPage.js:
Expand|Select|Wrap|Line Numbers
- var fso = new ActiveXObject('Scripting.FileSystemObject');
- var args = WScript.Arguments;
- var url = args(0);
- var fileName = args(1);
- var xmlhttp=new ActiveXObject("microsoft.xmlhttp");
- xmlhttp.open("GET", url, false);
- xmlhttp.send();
- var data=xmlhttp.responsetext;
- var file = fso.CreateTextFile(fileName, 2);
- file.writeLine(data);
- file.close();
cscript /nologo c:\GetWebPage.js http://www.YOUR_URL_HERE.com c:
\YOUR_OUTPUT_FILE_HERE.txt
_____________________________________
Is there a way to reverse this code to copy the file from the local to the webserver instead?