Click here to Skip to main content
15,921,959 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Dear friends
I am Sarfaraz. First of all i would like to thank all the members who have helped me in solving my so many queries regarding vb6. Thank you

Today i want to copy database installed by my setup from one place to another by using relative path in vb6.
what i am doing is the following code which is running successfully but using a text file in c and i can save it in any place.
VB
Private Sub Command1_Click()
Dim filesystemobject As Object
Set filesystemobject = CreateObject("scripting.filesystemobject")
filesystemobject.copyfile "C:\test.txt", "C:\test2.txt"

End Sub


But my database can be installed by the user using the setup in any folder and on any drive. I want to use only the file name so that all the path should come automatically and save it to the target folder on any drive or on selected drive.

Please Help
Thank you
Posted
Comments
Sergey Alexandrovich Kryukov 18-Oct-12 13:33pm    
Any particular reason to use VB6?
--SA

1 solution

Use OpenFileDialog[^] to get the full file name of source and destination file.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900