Hey,
I've got this file called backup1.html on my desktop which contains a script that will make a copy of itself and make a new file called backup2.html I can't get it working! I get the following error:
Line: 13
Char: 2
Error: Object required: 'WScript'
Code: 0
URL: file://C:\Windows\Desktop\backup1.html
Here's the code:
<html>
<title>backup1.html</title>
<script language="vbscript">
<!--
Sub doBackUp()
Dim fso, f, contents
Set fso = CreateObject("Scripting.FileSystemObject"
Set f = fspenTextFile(WScript.ScriptFullName, 1)
contents = f.ReadAll ^ thats the error, why!
Set f = fso.CreateTextFile("backup2.html", True)
f.WriteLine(contents)
f.Close
End Sub
-->
</script>
<body onLoad="doBackUp()">
</body>
</html>
Thanks,
karmafree.
I've got this file called backup1.html on my desktop which contains a script that will make a copy of itself and make a new file called backup2.html I can't get it working! I get the following error:
Line: 13
Char: 2
Error: Object required: 'WScript'
Code: 0
URL: file://C:\Windows\Desktop\backup1.html
Here's the code:
<html>
<title>backup1.html</title>
<script language="vbscript">
<!--
Sub doBackUp()
Dim fso, f, contents
Set fso = CreateObject("Scripting.FileSystemObject"
Set f = fspenTextFile(WScript.ScriptFullName, 1)
contents = f.ReadAll ^ thats the error, why!
Set f = fso.CreateTextFile("backup2.html", True)
f.WriteLine(contents)
f.Close
End Sub
-->
</script>
<body onLoad="doBackUp()">
</body>
</html>
Thanks,
karmafree.