I am working on a vbscript to do some log parsing and I am now to the point where I am trying to do some special things. I am currently getting a windows script host issue when trying to call a variable containing a UNC path with a hidden folder declaration (notated by the $). The code snipped looks as follows:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFileDest = "\\fileserver\filelocation$\folder\cleanstats.csv"
if objFileDest.FileExists then
set objFileW = objFSO.OpenTextFile(objFileDest, ForAppending)
Set objFileW = objFSO.CreateTextFile(objFileDest, ForWriting)
The error message says:
Object required: '[string: "\\fileserver\filelocation
It appears like storing a string with a $ in it is breaking my script. Any ideas how to escape that behavior?