• Forum
  • Lounge
  • CMD ****s, why won't this simple command

 
CMD ****s, why won't this simple command work ?

I'm trying to move multiple files :
move blah.cpp, blah.hpp, blah2.cpp, blah2.hpp F:\cpp\blah


And all i get is an annoying message :
The syntax of the command is incorrect.


Is there anything wrong ?
Last edited on
closed account (o1vk4iN6)
You don't use commas to differentiate input. Have you ever used the parameters of main(int, char* []) ?
closed account (Dy7SLyTq)
they can be comma seperated on windows. i dont think they are on windows, but on *nix systems ive seen commas, semicolons, colons, and whitespace (the classic one) as seperators
It doesn't work either
closed account (Dy7SLyTq)
i think you misunderstood what xerzi was saying. what you want to do is put all of the .cpp files in a folder then (x)copy the folder to f:\path
You cannot name more than one file (or directory) to move unless you're using wildcards. The "/?" information is incorrect.
I think that was a 6.0 feature that was almost immediately dropped. (The syntax was wonky to begin with anyway.)

Use wildcards or a for command:

C:\fooey> for %F in (blah.cpp blah.hpp blah2.cpp blah2.hpp) do @move %F F:\cpp\blah

If you are putting this in a batch file, be sure to double those % signs.
Topic archived. No new replies allowed.