| | | Forum Newbie
       
Group: Forum Members Last Login: 3/22/2008 8:35:21 AM Posts: 2, Visits: 2 |
| | i want to copy a file from fixed location like d:\my project\abc.txt (it reamins always fixed) to the folder user select like e:\backup\abc.txt now what is the code to copy and what is the code to paste files if any body know some sample project as just there are many sample availeable in this site please tell me thanks |
| | | | 
Forum God
       
Group: Forum Members Last Login: Today @ 8:00:49 AM Posts: 1,376, Visits: 3,098 |
| Welcome to A1vbcode muddasirmunir.  You don't actually copy using the ClipBoard. To copy a file you can use FileCopy or CopyFile functions. 'CopyFile source, destination[, overwrite]
CopyFile d:\my project\abc.txt, e:\backup\abc.txt, True
'or
'FileCopy source, destination
FileCopy d:\my project\abc.txt, e:\backup\abc.txt
With the CopyFile you can set if you want to overwrite the file. 
Keithhttp://www.martin2k.co.uk/forums/ I've been programming with VB for 12 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning. |
| |
|
|