1.

Solve : Creating a batch file that copies sub-folders?

Answer» <html><body><p>I have a batch file that reads<br/>Copy <a href="https://interviewquestions.tuteehub.com/tag/temporary-659719" style="font-weight:bold;" target="_blank" title="Click to know more about TEMPORARY">TEMPORARY</a>\%1  Directory 1<br/>Copy temporary\%1  Directory 2<br/>and so on <br/>for <a href="https://interviewquestions.tuteehub.com/tag/65-242054" style="font-weight:bold;" target="_blank" title="Click to know more about 65">65</a> directories (!)<br/><br/>What this does is to take ALL the <a href="https://interviewquestions.tuteehub.com/tag/files-20889" style="font-weight:bold;" target="_blank" title="Click to know more about FILES">FILES</a> in the folder called temporary and copy them to Directory 1 and to Directory 2 and so on.<br/><br/>Now, the complication is that the folder called temporary has a subdirectory called Documents with 20-25 files in it.<br/>I wiuld like to know what the syntax is for<br/>a) MD New Directory in Directory 1 and in 2 and so on<br/>b) copy the 20-25 files into it<br/>and - hopefully - all that with ONE command.<br/><br/>Any ideas?<br/><br/><br/><br/>Thanks!<br/><br/><br/><br/><br/>I would go with XCOPY or ROBOCOPY, in your batch file. <a href="https://interviewquestions.tuteehub.com/tag/quote-1175222" style="font-weight:bold;" target="_blank" title="Click to know more about QUOTE">QUOTE</a> from: Mute on October 19, 2010, 12:03:26 AM</p><blockquote>I would go with XCOPY or ROBOCOPY, in your batch file.<br/><br/></blockquote> <a href="http://www.mydigitallife.info/2007/05/07/robocopy-syntax-command-line-switches-and-examples/">http://www.mydigitallife.info/2007/05/07/robocopy-syntax-command-line-switches-and-examples/</a><br/><br/>Ducks that fly upside down quake up.</body></html>


Discussion

No Comment Found