How do i change to wscript ?
Below is vpscript
===========
'=========================================================
'======= Created and maintained by Anil Maurya V 1.5 =====
'=========================================================
sSourceFile = "C:\anil\CBDSTSM01.TXT"
sDestinationFile = "C:\anil\CBDSTSM01.log"
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set wshShell = WScript.CreateObject ("WSCript.shell")
' Append todays date and time to C:\anil\CBDSTSM01.log ..
Set pFSO = CreateObject("Scripting.FileSystemObject")
ForAppending=8
Set filetxt = pFSO.OpenTextFile(sDestinationFile, ForAppending, True)
filetxt.WriteLine("===============================================================================")
filetxt.WriteLine("===============================================================================")
filetxt.WriteLine( "=================== "&now()&" ===========================")
filetxt.WriteLine("===============================================================================")
filetxt.WriteLine("===============================================================================")
filetxt.Close
set ots=pFSpentextfile(sSourceFile,1,true,-2) 'using system default format(?)
s=""
on error resume next
s=s & ots.readall
on error goto 0
ots.close
set ots=pFSpentextfile(sDestinationFile,8,true,-2)
ots.write s
ots.close
set ots=nothing
pFSO.DeleteFile sSourceFile, True
set pFSO=nothing
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.