472,139 Members | 1,313 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,139 software developers and data experts.

file writing

I need the file name to be the date and the studnets name and have new file every time I open it

'Pass the file path and the file name to the StreamWriter constructor.
objStreamWriter = New StreamWriter("H:\vb\test.txt")
'Write a line of text.
objStreamWriter.WriteLine(APhilAvestrue)
objStreamWriter.WriteLine(MyTime) 'Write a second line of text.
'Close the file.
objStreamWriter.Close()
fileReader = My.Computer.FileSystem.ReadAllText("H:\vb\test.txt ")
Dec 11 '07 #1
1 944
i guess what my real qustion is. can i make the the file name a variable
Dec 11 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

48 posts views Thread by Joseph | last post: by
2 posts views Thread by Pierre Rouleau | last post: by
8 posts views Thread by Brandon McCombs | last post: by
4 posts views Thread by Oliver Knoll | last post: by
3 posts views Thread by StGo | last post: by
4 posts views Thread by Doug | last post: by
3 posts views Thread by brook | last post: by
12 posts views Thread by glennanthonyb | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.