Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.