• 0

[vb6] Copying Files


Question

2 answers to this question

Recommended Posts

  • 0

the easiest way of doing it is to impliemnt a routuine like this :

if dir(PATH TO FILE, vbNormal) <> "" then

kill PATHJ TO FILE

end if

filecopy source, destination

that deletes the file if it exists, and then copies it

alternatively, i THINK (but am not sure) that the File System Object has a file copy function that will overwrite a file... but that requires adding another dependancy to your project (ms scripting runtime reference (not object))

also, there are shell api declarations that would do it, but thats getting too difficult for such a simple thing

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.