Valhalla Legends Forums Archive | Visual Basic Programming | Input, Output, Append

AuthorMessageTime
Networks
My question is fairly simple. Please explain to me the output, input, and append or other functions that are involved in .txt, .ini documents. My goal is to make a logging system similar to Stealth Bots invovling making .txt with the current date as the filename but also making it so if the .txt file is already there that it will add to the document instead of make a new and overwrite it. I just need help understanding and maybe some help to make this logging function possbile for me.
March 3, 2004, 4:16 PM
Adron
Output overwrites, Input reads, Append appends. You want to use Append. For text files, it's typically easiest to use Append for appending text to say a log file, and Output for rewriting an ini file (rewriting the entire contents, because changing things in a text file typically requires moving stuff around).
March 3, 2004, 4:48 PM
Networks
how could make an applcation name a file a specific date each time to log data during that day?
March 3, 2004, 6:33 PM
Spht
[quote author=Networks link=board=31;threadid=5564;start=0#msg47261 date=1078338804]
how could make an applcation name a file a specific date each time to log data during that day?
[/quote]

Do you mean you want to title the filename based on the date?
March 3, 2004, 6:39 PM
Grok
[code]
Dim strFileName As String
strFileName = "C:\LogDir\" & Format(Now, "YYYYMMDD") & ".txt"
[/code]
March 3, 2004, 7:19 PM

Search