4

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?

0

2 Answers 2

6

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

1
  • all this while I was using / instead of \ May 8, 2014 at 11:07
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .