Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can i move all files of the same extension into another folder using cmd?

share|improve this question

To copy, can use the copy command with wildcards:

copy *.<extension> <other folder>

And if you to move your files instead: use the move the same way:

move *.<extension> <other folder>
share|improve this answer
    
Why copy when user wants to use move? move *.<extension> <other folder> works. (Edit: Ah, I see he wrote move/copy in the title, although only move in the question.) – Karan Oct 4 '12 at 19:36
    
You're right... I read too fast:) – m4573r Oct 4 '12 at 20:53

Here is an example of moving all files of the jpg format from the C:\ to D:\pictures\ using cmd.

Simply replace jpg with whatever format you wish and then change the to and from locations and you're sorted.

for /r C:\ %f in (*.jpg) do @copy "%f" D:\pictures\
share|improve this answer
1  
A bit convoluted for such a simple task. Wildcards are a much better answer. – Mike Christiansen Oct 4 '12 at 14:02
1  
I forgot about Wildcards until the other answer was posted sadly, changing my answer to that now would be a bit unfair on the other poster haha. – user163069 Oct 4 '12 at 14:05

You must log in to answer this question.

protected by Community Oct 24 '13 at 16:02

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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