Save file to current project

CoachBarker

Well-known member
Joined
Jul 26, 2007
Messages
133
Programming Experience
1-3
How would I go about saving a file I am creating in a project, to a folder in the current project?

In other words I can generate a vb file for an entity class, right now it is being saved to the folder where I am connecting to an access data base to get the information for the class. If it is the first entity class file I want to create a folder (Entity Classes) in the project and save the vb file there. Then all other entity class vb files created in that project will be saved to the same folder.

I think I remeber how to move a file, but can't I just create it where I want it to be?

Thanks
CoachBarker
 
I can't understand your words at all. Then, I think the following info will be useful for you


System.IO.Directory.CreateDirectory(Application.StartupPath & "\YourDirName")

and you can use FileStream with StreamWriter to form a code file.
 
Back
Top