1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

XCOPY without recreating DIR Structer

Discussion in 'Windows XP' started by aspirin, 2008/05/12.

  1. 2008/05/12
    aspirin

    aspirin Inactive Thread Starter

    Joined:
    2007/09/25
    Messages:
    48
    Likes Received:
    0
    Greetings!

    I would like to use XCOPY to copy all of my *.mp3 files from a directory with many subdirectories to a single directory so that all of my .mp3s are in one dir.

    Is there a way to do that with XCOPY or another command line command?

    Thanks,

    Brian
     
  2. 2008/05/12
    surferdude2

    surferdude2 Inactive

    Joined:
    2004/07/04
    Messages:
    4,009
    Likes Received:
    23
    Hi Brian and welcome,

    xcopy can't do that easily. I suggest you get the freeware XXCOPY which is more sociable.

    Then the command is simply:

    xxcopy C:\<your directory here> C:\<your new directory name here> /SGN

    You can modify that command script to suit your own naming preference or drive source and destination. The /sgn switch works the magic and there's nothing like it in xcopy.

    It will flatten all sub-directories and combine the files they contain into the one single directory that you designate. I think that is what you wanted to do if I understand you correctly.

    If you don't want to use the command line at all, you can simply right click the highest directory and do a search for *.mp3. That will give you a list of all the .mp3 files together so you can select all of them and copy/paste them anywhere you please.
     
    Last edited: 2008/05/12

  3. to hide this advert.

  4. 2008/05/12
    mopar Lifetime Subscription

    mopar Well-Known Member

    Joined:
    2002/03/21
    Messages:
    199
    Likes Received:
    1
  5. 2008/05/12
    aspirin

    aspirin Inactive Thread Starter

    Joined:
    2007/09/25
    Messages:
    48
    Likes Received:
    0
    Thanks very much! XXCOPY did the job and it looks like it's going to make life a little easier in the future.

    Thanks again!

    Brian
     
  6. 2008/05/12
    surferdude2

    surferdude2 Inactive

    Joined:
    2004/07/04
    Messages:
    4,009
    Likes Received:
    23
    It's a great tool with great power so be sure you have it harnessed properly lest it bite you. The major mistake would be to get the source and destination backwards when cloning.

    I should add that if you intend to run the command a second time to compile all those mp3's, be sure to add the /BI switch. That way it won't make duplicate files with synthesized names. I should have included the /BI switch when I posted since it would be OK from the start.

    xxcopy C:\<your directory here> C:\<your new directory name here> /SGN /BI

    Another example that would locate and copy all the .mp3's on your entire drive into a single folder would look like this:

    xxcopy C:\*.mp3 C:\<your new directory name here>\ /SGN /BI

    By including the \ after <your new directory name here> the command will execute without asking your permission to create the new directory.


    You'll appreciate XXCOPY more and more as you play around with it.

    You may also be interested in XXCLONE which is another freebie by the same people who brought you XXCOPY.

    All the best, Dude.
     
    Last edited: 2008/05/12

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.