How to get a temporary folder path and append?
Set fso = CreateObject("Scripting.FileSystemObject")
temp = fso.GetspecialFolder(2)
If fso.FileExists(temp&"\test.doc") Then
fso.DeleteFile(temp&"\test.doc")
End If
Set tempfile = fso.CreateTextFile(temp&"\test.doc")
tempfile.WriteLine("TestQTP")
Set tempfile = Nothing
temp = fso.GetspecialFolder(2)
If fso.FileExists(temp&"\test.doc") Then
fso.DeleteFile(temp&"\test.doc")
End If
Set tempfile = fso.CreateTextFile(temp&"\test.doc")
tempfile.WriteLine("TestQTP")
Set tempfile = Nothing
Comments
Post a Comment