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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AUTO EXTRACT

Status
Not open for further replies.

arkomnv

Programmer
May 22, 2006
14
BE
Hello there

I would like to create a cd witch a has 3 small programms on it.

When i put the cd in the drive it will autorun thx to the autorun file.

Now i have created a small installation program witch will put all the requerd textfiles and databases in the wright directories.

Now my question is how can i now witch drive path is used for the cd reader so i can copy files of the directories on the cd in to the directories i ll create with my program

Where should i place my datafiles on the cd????


THX
 
You can use Application.StartupPath to get the path to the directory from which the application is being run. You can put the files to copy in this directory or in a subdirectory.
For example, if the files to copy are in a directory called "Files", under the same directory as the executable:

Dim FileCopyPath As String

FileCopyPath = Application.StartupPath & "\Files"

So for a file named "File1.txt", the string for the copy would be:

Dim FileToCopy As String

FileToCopy = FileCopyPath & "\File1.txt"



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top