Fuego
04-28-2004, 04:43 PM
I want a txt file that is going to be updated when it does exist
and created when it doesnt exist. Right now Im using this :
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(Server.MapPath("input/" & strJaar & strMaand & DatePart("d", Date()) & ".txt"), 8)
objTextFile.WriteLine StrekenLijst
objTextFile.Close
Set objTextFile = Nothing
Set objFSO = Nothing
But when there's no file it will error of course I tried as well the next
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(Server.MapPath("input/" & strJaar & strMaand & DatePart("d", Date()) & ".txt"), 8)
objTextFile.WriteLine StrekenLijst
objTextFile.Close
Set objTextFile = Nothing
Set objFSO = Nothing
But that one will error when I want to update it.
I thought using the ,8 would work for this...But it doesnt..
Anyone to help me out?
and created when it doesnt exist. Right now Im using this :
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(Server.MapPath("input/" & strJaar & strMaand & DatePart("d", Date()) & ".txt"), 8)
objTextFile.WriteLine StrekenLijst
objTextFile.Close
Set objTextFile = Nothing
Set objFSO = Nothing
But when there's no file it will error of course I tried as well the next
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(Server.MapPath("input/" & strJaar & strMaand & DatePart("d", Date()) & ".txt"), 8)
objTextFile.WriteLine StrekenLijst
objTextFile.Close
Set objTextFile = Nothing
Set objFSO = Nothing
But that one will error when I want to update it.
I thought using the ,8 would work for this...But it doesnt..
Anyone to help me out?