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

Copy Files

Status
Not open for further replies.

MCH

Programmer
Dec 11, 2000
7
0
0
HK

How to implement copying files from one path to another in VB6? I don't want to use xcopy.exe from calling DOS prompt!!
Anyone can help me for this?

Thanks

MCH
 
You just have to remember that the source and destination have to include the file name. Destination can't consist of a directory (in DOS you might [tt]COPY MYFILE.TXT C:\WINDOWS[/tt]. You can't do that in VB. You have to [tt]FileCopy "MyFile.txt", "c:\windows\MyFile.txt"[/tt])

Shame it doesn't support wildcards very well. There are APIs to do that job, though.
VCA.gif

Alt255@Vorpalcom.Intranets.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top