PDA

View Full Version : Batch script >>>Brain Tease (W2K)



Abhionnet
05-28-2003, 02:27 PM
Let me explain it..

I hv two main folders in myhdd .Those folders contains many othe folders and files. and each folder itself contain many other files and folders. Now what io hv to create a new folder which will contain the these two folders and all the folder and unique files of each folder.


lets say folder1 has three folders aa bb and cc ,dd

--->aa has files 11 ,22,33
---->bb has files xx,yy,zz
---->cc has files xxx,yyy,zzz


lets say folder 2 has three folders aa bb and cc ,ee

--->aa has files 11 ,222,333
---->bb has files xx,yy,zzz
---->cc has files xxx,yyyy,zzzz


now the final folder

folder12 should hv folders aa,bb,cc,dd,ee

aa should hv ---> 11,22,33,333,222
bb should hv ---> xx,yy,zz,zzz
cc should hv ---> xxx,yyy,zzz,yyyy,zzzz




If i m correct we hv to design a recursive script...



i m very...very... confused ...



Plz help me

I appreciate every bit of help..


-------------------------
Make The World A better Place

dmortell
07-23-2003, 03:06 AM
Try xcopy:

mkdir c:\newfolder
xcopy path\folder1 c:\newfolder\folder1 /e /i /r /y
xcopy path\folder2 c:\newfolder\folder2 /e /i /r /y