Can I move files from nested folders with a single command?

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 231
    Windows 7
    Thread Starter
       #11

    I'm looking to "COPY" all "files" from multiple folders of a HD (some of the folders also have sub-folders) to a USB thumb drive so that all the files, no folders, reside on the thumb drive.
      My Computer


  2. Posts : 10,796
    Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
       #12

    Get a tool like XXCOPY
    http://www.xxcopy.com/index.htm

    Use it to copy all the files to a single directory

    eg
    xxcopy source destination /s /sx
    This would copy all files from the source, including subdirectories into a
    single directory (destination)
      My Computer


  3. Posts : 5,092
    Windows 7 32 bit
       #13

    badspell68 said:
    I'm looking to "COPY" all "files" from multiple folders of a HD (some of the folders also have sub-folders) to a USB thumb drive so that all the files, no folders, reside on the thumb drive.
    If X: is the thumb drive and you want to copy to the root you could do like

    for %s in (c:\folder1 d:\foldera\folderb c:\yuk) do rcopy /n %s\*.* X:\

    unzip rcopy.zip to a folder in your path so you can rust type rcopy without the full path.

    /n just means do not overwite if a destination file has the same name. See included Readme.txt

    Edit: you could use a tool like RichCopy or xcopy or robocopy but for this you don't have to mess with switches(except for /n) as rcopy is always recursive.
      My Computer


  4. Posts : 231
    Windows 7
    Thread Starter
       #14

    With Xcopy how would I copy all files from the souse, regardless of what folders or sub-folders they are in, to one source?

    And how would I do this with richcopy?
      My Computer


  5. Posts : 12,012
    Windows 7 Home Premium SP1, 64-bit
       #15

    I don't know how to do that (or if it can be done) with xcopy without duplicating the folder structure.

    But you can do it with xxcopy that is downloadable from Kaktussoft's link in post 12.

    This command:

    xxcopy /sr d:\temp d:\test

    will copy all files from D temp to D test and omit the folder structure. The r in the command appends the name of the source folder to the right edge of the file on the destination, to avoid over-writing files in the source directory tree that happen to have identical file names.

    So, a file named dog.jpg within the animals folder under D temp will be renamed to dog.jpg`animals on D test. And a file named dog.jpg within the pets folder on D temp will be renamed to dog.jpg`pets on D test. Otherwise, you'd either over-write or skip the second dog.jpg file if copying to a single folder.

    You can later run xxcopy source destination /srr to reconstruct the folder structure if necessary.

    If you change the command to

    xxcopy /s d:\temp d:\test

    the folder structure will be included.
      My Computer


  6. Posts : 5,092
    Windows 7 32 bit
       #16

    I only used RichCopy once to copy Windows.old over the network. You can get it here:
    RichCopy - Free download and software reviews - CNET Download.com

    For what it can do and how you need to read the documentation. But it's a good free tool for the toolbox.
      My Computer


  7. Posts : 231
    Windows 7
    Thread Starter
       #17

    I finally found a solution to my original post! It moves files from nested folders and disorganized locations. It will move any files, regardless of location or level of folder nesting. It copy's the files by extension type and worked great for organizing and moving my music file collection.
    https://youtu.be/BAKIBQvKafE
    Copy-By-Extension | "Automatically & Easily Copy or Move Files" Regardless of Location or Drive/Folder Structure!
    Last edited by badspell68; 30 Jun 2015 at 21:03.
      My Computer


  8. Posts : 51
    Windows 7 Home premium x64
       #18

    move %USERPROFILE%\AppData\Roaming\Mozilla S:\Users\%USERNAME%\AppData\Roaming\Mozilla

    I want to run this command but the destination directory and path doesn't exist. I want to create it by cmd but I want to move only files and folders in "Mozilla" folder. Is it possible?

    It is a useful way to keep write down to a SSD. I'm going to use it along with those commands:
    mklink /j %USERPROFILE%\AppData\Roaming\Mozilla S:\Users\%USERNAME%\AppData\Roaming\Mozilla
    mklink /j %USERPROFILE%\AppData\Local\Mozilla S:\Users\%USERNAME%\AppData\Local\Mozilla
      My Computer


  9. Posts : 5,656
    Windows 7 Ultimate x64 SP1
       #19

    Why not just move the Mozilla folder and execute the junction command?
      My Computer


  10. Posts : 51
    Windows 7 Home premium x64
       #20

    I need to do it by cmd because I want to do it in many pc's with SSD. I want a practical and automatic way to do it because It cost me more time.

    Also the script I'll make will be executed for every new user that it is created in each pc.
      My Computer


 
Page 2 of 3 FirstFirst 123 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:35.
Find Us