L
Long Nguyen
Hi
In vbscript how can I refer to the variable %TEMP% on the PC?
Basically I want to create a new file in a directory on PC pointed to by the
%TEMP% variable. However the code below does not work:
Dim fso, tf
Set fso = CreateObject("Scripting.FileSystemObject")
FileName = "%TEMP%\myfile.txt"
Set tf = fso.CreateTextFile(FileName, True)
If I use the file name "C:\myfile.txt" it works fine.
Thanks
Long
In vbscript how can I refer to the variable %TEMP% on the PC?
Basically I want to create a new file in a directory on PC pointed to by the
%TEMP% variable. However the code below does not work:
Dim fso, tf
Set fso = CreateObject("Scripting.FileSystemObject")
FileName = "%TEMP%\myfile.txt"
Set tf = fso.CreateTextFile(FileName, True)
If I use the file name "C:\myfile.txt" it works fine.
Thanks
Long