Link to home
Start Free TrialLog in
Avatar of sykotex
sykotexFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Writing file to directory executable is running in

Hi
I would like to save a file i am creating using vb studio 2010 to the same path the application is running from, code below
Using writer As StreamWriter = New StreamWriter(Log & ".txt", True)

Open in new window

Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

if you don't specify the folder, it should automatically be there.

otherwise, try application.startuppath
System.IO.Path.GetDirectory(System.Reflection.Assembly.GetExecutingAssembly.Location())
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial