This seems like it should be such a silly little thing, but for some reason I cannot get it to work.
At the end of a VBA procedure, I want to move all my input files into an archive folder. This is what I am trying:
It is returning an error that says: Run-time error 52: Bad file name or number.Code:Dim myFromPath as String Dim myToPath as String myFromPath = "G:\Input\*.*" myToPath = "G:\Input\Archive" FileCopy myFromPath, myToPath Kill myFromPath
I verified that all the folders and file names are correct, and that I have read/write rights to all the directories (I can manually copy and move files into these directories).
Can anyone tell what I am doing wrong?