locked
copy directories from multiple sub folders into one folder RRS feed

  • Question

  • HI All

    I ned to copy folder1\folder2\Folder3

    Folder3 to a common directory, can you pls help how i can achive this either through Richcopy or robocopy?


    GOD BLESS

    Sunday, April 1, 2012 11:56 AM

Answers

  • pretty sure this is all you need

    ROBOCOPY C:\Asia\Country\India\ C:\Destination /S

    The /S tells it to copy the subfolders.

    http://ss64.com/nt/robocopy.html

    theres a list there of all the robocopy commands

    • Proposed as answer by Jeremy_Wu Thursday, April 5, 2012 9:42 AM
    • Marked as answer by Nicholas Li Friday, April 13, 2012 4:36 AM
    Tuesday, April 3, 2012 7:08 PM

All replies

  • Hi,


    Do you mean that you want to copy files in a subfolder to a folder?


    If so, you can run command robocopy <Source> <Destination>.


    Please note, if there is a space in the name of a folder, you should add
    quotation marks for the whole path. Such as “C:\New folder”.


    For more detailed information, please refer to
    Robocopy and RichCopy.


    Hope this helps.


    If a post solved your problem, click “Mark as Answer” on the post. If a post helped you, click "Vote As Helpful" on the left side of post.

    • Proposed as answer by Jeremy_Wu Thursday, April 5, 2012 9:42 AM
    • Marked as answer by Nicholas Li Friday, April 13, 2012 4:36 AM
    • Unmarked as answer by Nicholas Li Friday, April 13, 2012 4:36 AM
    Tuesday, April 3, 2012 4:39 AM
  • Thanks for the reply

    i have

    C:\Asia\Country\India\"Folder India has 'n' number of sub folders" i want to copy all the sub-folders in <india> to a new folder. like wise i have lot more folders, under Asia folder. can there be a command which can copy all the subfolders in Country\<country name>\<sub folders> to a common in C:\New Region? I have tried RichCopy but i am not able to get the desired results kindly suggest and help

    GOD BLESS



    • Edited by Phil4 Tuesday, April 3, 2012 6:12 PM mistakes
    Tuesday, April 3, 2012 6:10 PM
  • pretty sure this is all you need

    ROBOCOPY C:\Asia\Country\India\ C:\Destination /S

    The /S tells it to copy the subfolders.

    http://ss64.com/nt/robocopy.html

    theres a list there of all the robocopy commands

    • Proposed as answer by Jeremy_Wu Thursday, April 5, 2012 9:42 AM
    • Marked as answer by Nicholas Li Friday, April 13, 2012 4:36 AM
    Tuesday, April 3, 2012 7:08 PM
  • well I am missing to arituclate the exact situation. let me put it the other way. i have a huge dump of of data in hundered of sub-folders. for eg. C:\Folders\<multiple subfolders and directories>

    what command should copy all the sub-folders to c:\destination

    I mean our command should re-curuse to all these multiple subfolders and directories and copy the contents to one single folder C:\destination


    GOD BLESS

    Friday, April 20, 2012 11:26 AM
  • That command I gave you will do what you want.  Have you tried it?

    ROBOCOPY C:\Asia C:\Destination /S


    • Edited by Ang101 Friday, April 20, 2012 11:58 AM
    Friday, April 20, 2012 11:58 AM
  • Yes, i have tried. But it will only copy first leave of directories in Asia folders, but under sub directories there are multiple directories, if i am not wrong we may have to write a script to recurse till the end for a sub-folders and bring all the directories into a common folder. hence i am seeking help.


    GOD BLESS

    Thursday, April 26, 2012 3:11 AM
  • try adding /COPYALL /E to the end
    Thursday, April 26, 2012 12:17 PM