• Welcome to Valhalla Legends Archive.
 

Input, Output, Append

Started by Networks, March 03, 2004, 10:16 AM

Previous topic - Next topic

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.

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).

Networks

how could make an applcation name a file a specific date each time to log data during that day?

Spht

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?

Grok


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