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!

Bringing a file from the server to copy on an "A" drive??? 1

Status
Not open for further replies.

atech4

Technical User
Apr 13, 2000
2
0
0
US
Visit site
I've designed the form with the required drive list box, which gives me access to our server and the file (named 2.53.1). I now need to copy this file to an &quot;A&quot; drive diskette. ????<br>Help!<br><A HREF="mailto:larrya@onebox.com">larrya@onebox.com</A>
 
<br>Use the Win32 API called &quot;CopyFile&quot;.<br><FONT FACE=monospace><br>Private Declare Function CopyFile Lib &quot;kernel32&quot; Alias &quot;CopyFileA&quot; (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long<br></font><br><br>This function returns a zero if it fails.&nbsp;&nbsp;Call <FONT FACE=monospace>GetLastError()</font> if you want to find out the Win32 error code.<br><br>Chip H.<br>
 
Exist the visual basic function :<br><br>&nbsp;&nbsp;&nbsp;&nbsp;FileCopy(source as string, destination as string)<br><br><br>Fabiana Etchepare
 
Fabiana -<br><br>Thanks for the tip -- I had forgotton about it.&nbsp;&nbsp;So once again, I suggested a too-complex solution!<br><br>But maybe it's good practice for atech4 to make an API call -- that way he/she can learn some about how to make low level calls.<br><br>Chip H.<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top