I have a directory which contains CSV files needing to be moved to another directory:
C:UsersJohnSmithDesktopTesting
eport-20180819040000-20180826040000-4
We receive a new file weekly where the dates in the directory name will be updated. I want to create a batch file to copy this data using a wildcard on report*
but I am running into some issues.
The wildcard appears to work without any issues when I first navigate to:
C:UsersJohnSmithDesktopTesting
then use:
dir report*
It also works fine when I navigate to:
C:UsersJohnSmithDesktopTesting
then run
copy * C:UsersJohnSmithDesktopTestingDestination
My goal is to be able to run something simple in my batch file like the below:
copy C:UsersJohnSmithDesktopTesting
eport* C:UsersJohnSmithDesktopTestingDestination
Whenever I try running the above, I receive the following error:
The system cannot find the file specified.
0 file(s) copied.`
Does anyone have any suggestions?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…