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 need a batch file to find all of my *.sql file in specefic folder and its subfolder like "c:\aaa\" and by using xcopy copy the latest version of them on other folder like "c:\bbb\"

would you help me?

I use windows xp.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Try this in your command prompt:

C:\>for /R c:\aaa %G IN (*.sql) DO xcopy "%G" C:\bbb\

It recurses through c:\aaa\ and its subfolders and copies the found *.sql files to c:\bbb (without the original folder structure).

share|improve this answer
    
Thanks bro,work fine –  rima Dec 10 '10 at 9:46

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.