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

I want to collect all images and movies in one folder. I try to type in Windows XP CMD:

set nowy="c:\nowy"
mkdir %nowy% 
for /R %f in (*.mpg *.swf *.jpg) DO (copy "%f" %nowy%)

but it seems that if I am on C%cd%=C:), the system tries to copy files also from... c:\nowy to c:\nowy and it's asking if they should be overwritten.

Is there a more convenient way?

share|improve this question
    
What, exactly, are you trying to do? – Hello71 Dec 2 '11 at 21:27

Not the most elegant solution, but you can suppress that prompt with copy /Y "%f" %nowy%

share|improve this answer

You must log in to answer this question.

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