Can anyone tell me the code to copy files from drive A: to drive C: on the click of a button. (VB V.5)
Thanks a lot.
P.S. Finding it difficult to get FileCopy to work!
Printable View
Can anyone tell me the code to copy files from drive A: to drive C: on the click of a button. (VB V.5)
Thanks a lot.
P.S. Finding it difficult to get FileCopy to work!
Make sure you leave out the paranthesis
Code:FileCopy "A:\whatever.txt, "C:\Test\whatever.txt"
Just pasted code in and altered file names, got the following error message :
"Expected list seperator or )" - The cursor appeared avoer the C:
Any info to fix this?
Thanks
Yeah, dont use the paranthesis. Just:
Code:FileCopy "C:\Test.txt", "C:\Testing\Test.txt"
I left the parenthesis out, altered the filenames but this time the error message is :
"Invalid Outside Procedure" - This appears over my filename which is "A:\Folder1\Item1.XLS"
How can I fix this error
this isn't just free floating code, right? you need to have it inside a Sub or Function...