Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setup Project 1

Status
Not open for further replies.

jaws1972

MIS
Nov 7, 2002
34
0
0
GB
I have a project that is working fine on installation apart from one minor problem

As part of an "end of day" routine I copy out a file into two folders. The problem I have is that I can't seem to include these folders in the setup project

Is there a way to include folders into the installed projects directory ? Or is there a way to check if the folders exist in code, and if they don't then to create them ?

I am self-taught and have only been using Visual Basic for 3 months so please excuse me if this is a really dumb question

Thanks (in advance)

Anthony [glasses]
 
You can use the System.IO.Directory class to check if the folders exist, and if not create them. Something like:
Code:
Dim d As System.IO.Directory

If Not d.Exists("C:\Test") Then d.CreateDirectory("C:\Test")
If you include this in your closing code, then if the user deletes the folders your app will automatically recreate them again.
 
Thanks for that SHelton - it worked a treat [2thumbsup]

Have yourself a star from me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top