Flat files from a long list of folders

  1. Posts : 7
    Windows 10 Home

    Flat files from a long list of folders

    I downloaded my photos from google photos to use in a display frame. The frame expects a flat list of files with no directory structure.

    The archive I got from google has a zillion folders with a few files in each.

    How can I convert a directory full of folders into a flat listing of all the files in them?
      My Computer

  2. Posts : 13,950
    Windows 10 Pro X64 21H1 19043.1503

    You still need the fully qualified path to each file.

    This works for me: dir D:\Canon\Pictures /s /n /on /b

    Output looks like this:

    D:\Canon\Pictures\Volkswagon Car Show\2009-10-11\085.JPG
    D:\Canon\Pictures\Volkswagon Car Show\2009-10-11\086.JPG
    D:\Canon\Pictures\Volkswagon Car Show\2009-10-11\087.JPG
    D:\Canon\Pictures\Volkswagon Car Show\2009-10-11\088.JPG
    D:\Canon\Pictures\Volkswagon Car Show\2009-10-11\089.JPG
    D:\Canon\Pictures\Warped Cartoons\image1.jpg
    D:\Canon\Pictures\Warped Cartoons\image10.jpg
    D:\Canon\Pictures\Warped Cartoons\image11.jpg
    D:\Canon\Pictures\Warped Cartoons\image12.jpg
    D:\Canon\Pictures\Warped Cartoons\image13.jpg
    If you redirect the output to a file then you can do whatever you need with it:

    dir D:\Canon\Pictures /s /n /on /b > pics.txt
      My Computers

  3. Posts : 7
    Windows 10 Home
    Thread Starter

    I errantly stated my needs....I need a folder containing the files in all of those folders. Not just a listing.
      My Computer

  4. Posts : 12,472
    Win10 Version 21H2 Pro and Home, Win11 Pro

    I did the same some time ago and created the Folder on an SDHC card and Copied all the desired files to that Folder [didn't disturb the originals]. A basic issue for years has been that a single Folder cannot contain 2 or more files of the same exact name, duplicates would have to be renamed by at least 1 character difference.
      My Computers

  5. Posts : 7
    Windows 10 Home
    Thread Starter

    My dilemma is that I have 16,000 files buried in about 4,000 folders. I need to automate this process somehow.
      My Computer

  6. Posts : 2,487
    Windows 10 Home, 64-bit

    You can use the Everything search tool from voidtools.com

    Enter the proper search term, probably .jpg

    The window will then show all files with a .jpg extension.

    Sort by directory structure if necessary, if there are some jpg files you want to exclude.

    Highlight the desired jpg files with the mouse in that Everything window.

    Right click and copy. It might take a few minutes for that to take effect.

    Then paste to the folder of your choice.

    The destination folder will then have all the files, flat, with no directory structure at all.

    There are other ways, but that's what I use.
      My Computer

  7. Posts : 7
    Windows 10 Home
    Thread Starter

    I'll give it a try...thanks!
      My Computer

  8. Posts : 2,487
    Windows 10 Home, 64-bit

    If you have 16000 files, the copy process may choke or stall or fail--due to the total amount of files in a single batch.

    If that happens, try smaller batches at a time. Perhaps 6000, 6000 again, and then 4000 for the remainder. Just make a note of which directories you grabbed on each attempt so you are sure to get them all within the 3 batches.

    I did what you are doing a couple of weeks ago, for 29000 mp3 files. I broke the copy process up into 4 or 5 batches.
      My Computer

  9. Posts : 12,472
    Win10 Version 21H2 Pro and Home, Win11 Pro

    An experience: I was doing file management a couple of months ago using my HP 1.5GHz Notebook with 4GB RAM, also got choked. Since it wasn't readily feasible to add more RAM my solution was to plug in an 8GB SDHC card and activate ReadyBoost, works great and can be either a temporary solution or leave it in.
      My Computers


  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 00:09.
Find Us

Windows 10 Forums