bradyboyy88
Well-known Member
- Joined
- Feb 25, 2015
- Messages
- 562
I am trying to append this piece of code so that it automatically overwrites a file. It looks like /Y might need to be added somewhere but I am not sure where exactly and I tried it like this "* /Y" and that didnt work.
Code:
'Copy files without waiting for file transfer to resume code
Sub FileCopyImproved(sSourceFile As String, sDestFile As String)
'Asynch File Copy
Shell Environ$("comspec") & " /c xcopy """ & sSourceFile & """ """ & sDestFile & "*" & """ ", vbHide
End Sub