Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Networks on March 03, 2004, 10:16 AM

Title: Input, Output, Append
Post by: Networks on March 03, 2004, 10:16 AM
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.
Title: Re:Input, Output, Append
Post by: Adron on March 03, 2004, 10:48 AM
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).
Title: Re:Input, Output, Append
Post by: Networks on March 03, 2004, 12:33 PM
how could make an applcation name a file a specific date each time to log data during that day?
Title: Re:Input, Output, Append
Post by: Spht on March 03, 2004, 12:39 PM
Quote from: Networks on March 03, 2004, 12:33 PM
how could make an applcation name a file a specific date each time to log data during that day?

Do you mean you want to title the filename based on the date?
Title: Re:Input, Output, Append
Post by: Grok on March 03, 2004, 01:19 PM

Dim strFileName As String
strFileName = "C:\LogDir\" & Format(Now, "YYYYMMDD") & ".txt"