How can I copy all images in a PC while preserving folder structure?

Page 1 of 2 12 LastLast

  1. Posts : 163
    Windows 10
       #1

    How can I copy all images in a PC while preserving folder structure?


    Is there any way to copy all images (pictures) in a PC while preserving Directory Structure?, or any other file type, for that matter.

    I'm now using robocopy for something similar, but it lumps all files together in the target folder.

    robocopy C:\ "<path_to_folder9>" *.jpg *.jpeg *.png *.gif /e

    My aim is to retrieve all images (or other file type) for customer's PCs in one fell swoop, without having to manually search inner folders and create a similar folder structure.

    I guess robocopy isn't the right tool for this and I should use some other app?

    Any help much appreciated.
    Last edited by Frank15; 29 Jan 2022 at 15:58.
      My Computer


  2. Posts : 2,144
    Windows 11 Pro (latest update ... forever anal)
       #2

    Frank15 said:
    I'm now using robocopy for something similar, but it lumps all files together in the target folder.
    Huh ??

    Robocopy should be the most powerful and effective way of doing exactly what you want. Can you post the command line you're using?
      My Computers


  3. Posts : 781
    Windows 10
       #3

    robocopy sounds like the best option for you, @Frank15, in this situation.

    Code:
    robocopy C:\ "<path_to_folder9>" *.jpg *.jpeg *.png *.gif /e
    You can use that command for any of your drives, but it will keep only the newest file if you have a file in the same path with the same name on more that one drives. Alternatively, you can do it with a destination per drive like this:

    Code:
    robocopy C:\ "<path_to_folder9>\C" *.jpg *.jpeg *.png *.gif /e
    It doesn't use the lists you created, but everything I can think of that does is a lot more work.
      My Computer


  4. Posts : 2,800
    Windows 7 Pro
       #4

    Code:
    Robocopy c:\source d:\Destination *.jpg *.jpeg *.png *.gif /s
      My Computers


  5. Posts : 14,022
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #5

    I haven't any issue with copying. I don't do it with files but with the desired upper-most folder the files and subfolders are in, just click and drag that folder to the desired location in File Explorer or other file managers such as Total Commander, FreeCommander or MultiCommander. The folder structure stays the same and files in the destination remain the same as in the source folders. It can also work right-clicking that folder and Copy then Paste where desired. I do it from the internal drive to either a USB drive or NAS drive or the other way around, start the process and go to other things.
      My Computers


  6. Posts : 163
    Windows 10
    Thread Starter
       #6

    idgat said:
    Huh ??

    Robocopy should be the most powerful and effective way of doing exactly what you want. Can you post the command line you're using?
    robocopy C:\ "<path_to_folder9>" *.jpg *.jpeg *.png *.gif /e
    I add another line if there're two drives, such as:
    robocopy D:\ "<path_to_folder9>\D" *.jpg *.jpeg *.png *.gif /e

    My aim is to retrieve all images (or other file type) for customer's PCs in one fell swoop, without having to manually search inner folders and create a similar folder structure.

    I guess robocopy isn't the right tool for this and I should use some other app?


    Thank you
      My Computer


  7. Posts : 8,111
    windows 10
       #7

    The robocopy mirror option should do it
      My Computer


  8. Posts : 2,144
    Windows 11 Pro (latest update ... forever anal)
       #8

    Frank15 said:
    My aim is to retrieve all images (or other file type) for customer's PCs in one fell swoop, without having to manually search inner folders and create a similar folder structure.


    Was exactly one of the reasons I started using Robo


    Frank15 said:
    I guess robocopy isn't the right tool for this and I should use some other app?
    It most certainly is, perfect for it.

    Try this command line

    robocopy C:\ D:\{to path}\destinationfoldername /CopyAT /s *.jpeg *.jpg *.png *.gif /a-:rsh /r:0 /w:0

    EDIT Damn that emoji smiley face - code should be /Copy : DAT but with no spaces either side of : character
      My Computers


  9. Posts : 372
    Windows 10 Home: 21H1 (OS Build 19043.1586)
       #9

    idgat said:


    Was exactly one of the reasons I started using Robo




    It most certainly is, perfect for it.

    Try this command line

    robocopy C:\ D:\{to path}\destinationfoldername /CopyAT /s *.jpeg *.jpg *.png *.gif /a-:rsh /r:0 /w:0

    EDIT Damn that emoji smiley face - code should be /Copy : DAT but with no spaces either side of : character

    Hi idgat,

    If you click the # symbol in the post editor interface (third icon from the right) you will not have emoji problems, or need to use spaces, or explanations about having to do that. That wraps the line between CODE tags. Less hassle for you.

    Like this:

    Code:
    C:\ D:\{to path}\destinationfoldername /Copy:DAT /s *.jpeg *.jpg *.png *.gif /a-:rsh /r:0 /w:0

    Just a suggestion.

    Christophe
      My Computers


  10. Posts : 11,247
    Windows / Linux : Arch Linux
       #10

    CMArbres said:
    Hi idgat,

    If you click the # symbol in the post editor interface (third icon from the right) you will not have emoji problems, or need to use spaces, or explanations about having to do that. That wraps the line between CODE tags. Less hassle for you.

    Like this:

    Code:
    C:\ D:\{to path}\destinationfoldername /Copy:DAT /s *.jpeg *.jpg *.png *.gif /a-:rsh /r:0 /w:0

    Just a suggestion.

    Christophe
    This is certainly ONE area where if you can get to grips with it - get a LIVE LINUX distro - ensure NTFS-3g rsysnc and grsync are installed and it's the easiest way WITH A GUI of copying with directory structures etc etc -- sometimes you have to use different better tools for a job -- for example you wouldn't use a steam Hammer on a tiny nail.

    Use GRSYNC

    How can I copy all images in a PC while preserving folder structure?-screenshot_20220130_092219.png

    I have yet to see any better tool for doing this (there's loads of options too) -- the default though works perfectly for what the OP needs. It logs progress as well -- brilliant tool - been using it since XP days for backing up Windows data files as well as NAS data files to external storage devices.

    Macrium etc is great for backing up the OS but user data needs another approach.

    OK it's a Non Windows solution but what's wrong if it gets the job done easily, correctly and quickly. You could also use this in a VM of course if you don't want to mess around with bootable live distros.

    Even easier you can set up a job to run this to backup various directories at specific times automatically -- you can set to not overwrite existing files on the backup device, overwrite if newer etc etc.

    Cheers
    jimbo
      My Computer


 

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

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




Windows 10 Forums