Only me!
I've just moved the bed in as I can see this being my second home now!
I have 2 text files with one numerical value each (i.e. 54338). I would like to get another script to take one value and subtract it from the other, and have this resultant value written to a new (3rd) text file.
what I have is:
Const ForReading = 1
strComputer = "."
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile1 = objFSO.OpenTextFile("..\freespacebefore.txt", ForReading)
objFile1.Close
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile2 = objFSO.OpenTextFile("..\freespaceafter.txt", ForReading)
objFile2.Close
Set objFile3 = objFSO.CreateTextFile("..\savedspace.txt")
objFile3.WriteLine "savedspace=" & (objFile2-objFile1)
objFile3.Close
The error message I am getting is 'Object doesn't support this property or method' - refering to the highlighted text.
Help me Obi Wan......
I've just moved the bed in as I can see this being my second home now!

I have 2 text files with one numerical value each (i.e. 54338). I would like to get another script to take one value and subtract it from the other, and have this resultant value written to a new (3rd) text file.
what I have is:
Const ForReading = 1
strComputer = "."
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile1 = objFSO.OpenTextFile("..\freespacebefore.txt", ForReading)
objFile1.Close
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile2 = objFSO.OpenTextFile("..\freespaceafter.txt", ForReading)
objFile2.Close
Set objFile3 = objFSO.CreateTextFile("..\savedspace.txt")
objFile3.WriteLine "savedspace=" & (objFile2-objFile1)
objFile3.Close
The error message I am getting is 'Object doesn't support this property or method' - refering to the highlighted text.
Help me Obi Wan......