Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Creating Folder Structure Inside already existing folders,Through Bat file

    • 0
    • 1
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 366
    Comment on it

    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 alt text
    Then i realise that i forgot to make folders inside these LS folders..
    Basically i want a folderstructure like this..

    picture 2

    alt text

    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



    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



    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



    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



    11. Now run the bat file..it will create the folder structure inside LS folders

    picture 7

    alt text

    If you like my blog please Do like and comment.. :)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: