Move a file to archive folder in cmd using wildcards

I'm using this command:

move C:\folder\*.txt C:\folder\archive\*.txt

I'm trying to move multiple files to an archive folder using the *.txt but I get an error that states it cannot find the file specified.

Any suggestions?


Solution 1:

syntax is move C:\folder\*.txt C:\folder\archive

Solution 2:

The move command does not allow wildcards in the destination, which must be an existing directory if you're moving more than one file. (The syntax for move is different than for rename, which may be confusing you. ) Here's an example:

> dir /w
 Volume in drive C is Windows7
 Volume Serial Number is E441-3A51

 Directory of C:\Users\Nicole\Desktop\MoveExample

[.]      [..]     file1    file2    [folder]
               2 File(s)             27 bytes
               3 Dir(s)  507,369,046,016 bytes free

> move file* fold*
The filename, directory name, or volume label syntax is incorrect.

> move file* newfolder
Cannot move multiple files to a single file.

> move file* folder
C:\Users\Nicole\Desktop\MoveExample\file1
C:\Users\Nicole\Desktop\MoveExample\file2
        2 file(s) moved.