Reputation: 7
I have a sub that has to merge all txt files into one named all.txt. It should be run by pressing a button associated to this sub, but it generates the Run-time error 53 File not found. The code is this:
Private Sub CommandButton1_Click()
Call Shell("copy c:\test\*.txt c:\test\all.txt", vbNormalFocus)
End Sub
Where is the error?
Upvotes: 0
Views: 369
Reputation: 107
copy
Is an internal command of CMD.exe
So
CMD /C copy blah blah
See
CMD /?
Upvotes: 1