I found it to be easier and more robust not to use FileCopy or Name and just use the SHFileOperation API function as it gives you much more flexibility, and if there is an error, it won't raise it (gives you back the error code) and create handling headaches for you.
Also, though you'd think Name would just do a rename, it actually does a copy followed by a delete. Try it on a large file - it should be instantaneous, but, you can watch in Explorer as it does the copy. The SHFileOperation let's you do a real rename - and again, many more options than what VB provides you with.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.