Go Back   PCMech Forums > Windows Support > Windows Legacy Support (XP and earlier)

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 05-28-2003, 04:24 PM   #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..
healtheworld is offline   Reply With Quote
Old 05-28-2003, 04:40 PM   #2
Member (14 bit)
 
reboot's Avatar
 
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
__________________
Black holes are where God divided by zero...
Cheers, Jim

Jims Modems
reboot is offline   Reply With Quote
Old 05-28-2003, 05:12 PM   #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
healtheworld is offline   Reply With Quote
Old 05-28-2003, 05:35 PM   #4
Member (14 bit)
 
reboot's Avatar
 
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.
reboot is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:52 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2