gomindi Posted December 27, 2002 Posted December 27, 2002 I am trying to create a new file that will temporarily store information from my text boxes. Does somebody know the syntax to create a new file? Thank you! Mindi Wright Quote
*Experts* Volte Posted December 27, 2002 *Experts* Posted December 27, 2002 'Create a file and write to it Dim f As IO.StreamWriter f = IO.File.CreateText(IO.Directory.GetParent( _ Application.ExecutablePath).ToString & "\Temp.txt") f.Write("blah") f.Close() Quote
gomindi Posted December 27, 2002 Author Posted December 27, 2002 Do you know how I can change the directory? This worked, it created it in my visual studio projects/test/bin folder. But do you know how I can change this? I tried to add a different path before the \temp.txt, but that didn't work for me. I really appreciate your help! Quote
*Experts* Volte Posted December 27, 2002 *Experts* Posted December 27, 2002 Change the Application.ExecutablePath).ToString & "\Temp.txt") bit to something else, like 'C:\stuff\Temp.txt'. You can give it a relative path like I did, or an absolute path. Quote
gomindi Posted December 27, 2002 Author Posted December 27, 2002 Cool Thank you! Hey where did you get the posted code? Or any other "beginner" tutorials out there to help me with Files? thanks! Mindi Quote
*Experts* Volte Posted December 28, 2002 *Experts* Posted December 28, 2002 I read the MSDN :) It should have been installed with .NET if you chose to install it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.