Creating Folder Structure Inside already existing folders..Through Bat file
Hey guys...!!
Today i am gonna show you "how to make folders or folder structure inside already existing folders
so what i have done is, I created a folder named as LogicSimplified.
Inside this folder i have created 21 folders and their name starting from LS001 to LS021..
Picture 1
Then i realise that i forgot to make folders inside these LS folders..
Basically i want a folderstructure like this..
picture 2
![alt text](https://lh6.googleusercontent.com/-I4DIpJAiflQ/UqWmF3lZF9I/AAAAAAAAADo/e8l7eL6OE2o/w572-h768-no/2.jpg)
So lets make these folders..
1.For this i created a new folder, name as "structure". in this folder i have created 4 folders
"Designing Department" and "Development Department"
and "Team Members" folder inside these..
2. So lets start....first we have to make the list of folders, Inside which we want to paste this structure...
(For making list of files and folders through DOS,you can visit to my previous blog "Renaming Multiple files through DOS commands" the link is as follows)
http://findnerd.com/account/#url=/list/view/Renaming-Multiple-files-through-DOS-commands/224/
3. Once we have created a list of folders, Open a new MS Excel sheet and paste the list in the sheet..
4. We use xcopy command, Now the syntax will be like this...
<br>Xcopy "C:\Documents and Settings\abhishek\Desktop\BLOG\For Blog\structure" "C:\Documents and Settings\abhishek\Desktop\BLOG\For Blog\LogicSimplified\
5. paste this command before the column of list and drag it down upto the end of list..like in the following image..
picture 3
![alt text](https://lh3.googleusercontent.com/-b8E-uRQZ8ms/UqWmGRhz87I/AAAAAAAAADw/IwBY-YDTDdM/w1024-h720-no/3.jpg)
6 The command is not completed yet..
like for the first folder "LS_001" the command will be as follows:-
Xcopy "C:\Documents and Settings\abhishek\Desktop\BLOG\For Blog\structure" "C:\Documents and Settings\abhishek\Desktop\BLOG\For Blog\LogicSimplified\LS_001\" /e
7. what this command does?? it will copy the folders and file from the structure folder and paste it inside LS_001.
i have use /e at the end of the command... because by using /e perimeter at the end will make the command to copy empty folders as well.
we already have all the Folder names in Excel that means in the next column we have to add \" /e to complete the command.
picture 4
![alt text](https://lh4.googleusercontent.com/-_d1k-cpyKAg/UqWmHFFS-0I/AAAAAAAAAD4/iTHWbCBV2X8/w490-h716-no/4.jpg)
8.Drag the values of column F upto the end of the folder list..as shown in above picture..
9. very Good !! our command is ready..But we have to combine the command..as it is divided in cells..
so for joining the commands..we use the following formula.
=D3&E3&F3
i have paste this formula at column C row 3rd..it will join the content of D3,E3 and F3 into C3..now
Drag this formula upto the end of the list..
picture 5
![alt text](https://lh6.googleusercontent.com/-72Qyjc8fScU/UqWmHm6WJSI/AAAAAAAAAEA/ydIAnzTvTac/w492-h718-no/5.jpg)
10 cool !! Its time to make a bat file..Copy this column "column c" and paste it in a new Txt file.now
choose save as option and save this file as "structure.bat" with inverted commas.
Picture 6
![alt text](https://lh3.googleusercontent.com/-bdUqb1iis0c/UqWmH9LyR8I/AAAAAAAAAEI/XTL77TCUJ5Q/w974-h654-no/6.jpg)
11. Now run the bat file..it will create the folder structure inside LS folders
picture 7
![alt text](https://lh5.googleusercontent.com/--qiI70KT2iQ/UqWmIUXKEkI/AAAAAAAAAEM/OdkKhu_6jhs/w820-h726-no/7.jpg)
If you like my blog please Do like and comment.. :)
0 Comment(s)