|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
Join Date: Mar 2003
Posts: 87
|
Batch script
Hello Friends..
I hv a system which have two folders in my c: drive. Now these folders hv some set of files and other folders . Now i want to design s batch file or a windows scripting file which can do the following thing 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.. |
|
|
|
|
|
#2 |
|
Member (14 bit)
Join Date: Mar 1999
Location: Kelowna, B.C., Canada
Posts: 9,138
|
@echo off
cd\ md myfolder cd myfolder md aa md bb md cc xcopy c:\myhdd\folder1\aa\*.* c:\myfolder\aa\*.* /y /s xcopy c:\myhdd\folder1\bb\*.* c:\myfolder\bb\*.* /y /s xcopy c:\myhdd\folder1\cc\*.* c:\myfolder\cc\*.* /y /s xcopy c:\myhdd\folder2\aa\*.* c:\myfolder\aa\*.* /y /s xcopy c:\myhdd\folder2\bb\*.* c:\myfolder\bb\*.* /y /s xcopy c:\myhdd\folder2\cc\*.* c:\myfolder\cc\*.* /y /s |
|
|
|
|
|
#3 |
|
Member (7 bit)
Join Date: Mar 2003
Posts: 87
|
Gotcha.. But Need More assistance
Thanx for Immediate help..
But i want a script which will run for n number of directories .. Waiting 4 ur response |
|
|
|
|
|
#4 |
|
Member (14 bit)
Join Date: Mar 1999
Location: Kelowna, B.C., Canada
Posts: 9,138
|
You can't use wildcards for folder names, you'll have to specify each one.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|