FileDial › Guides › Archives, folders and renaming
How to flatten a folder of subfolders on a Mac
By Himanshu Ranjan · Updated 8 November 2026
Select the folder in Finder, open FileDial and choose Batch › Flatten folder. It copies every file into one new folder, so your original tree and its files stay as they are. Check for same-name files afterwards, since the note does not say how clashes are handled. It runs offline.
What it does
Download dumps, project trees and exported archives bury files several levels deep. Batch › Flatten folder copies every file into one new folder. Because it copies, your original tree stays intact, which makes it a safe first move.
The note keeps it plain: copies every file into one new folder. That is all you should assume.
Steps
Run it, then inspect the new folder before you remove anything.
- Select the top folder in Finder.
- Open the dial with the right Option key and choose Batch, then Flatten folder.
- Open the new folder and sort by kind, date or name.
- When satisfied, tidy or delete the original tree yourself.
Name clashes
Two files with the same name in different subfolders cannot sit in one folder unchanged, so check for duplicates after flattening. The tool's note does not describe how clashes are resolved, so open the result and verify the count against the original.
A useful follow-up is Rename › Rename with sequence… or Rename › Add date prefix, which gives every file a distinct, sortable name.
Alternatives and follow-ups
If you want files grouped rather than flat, Batch › Sort into folders by type and Batch › Sort into folders by date copy files into sorted folders; the date version sorts by creation month. Batch › Sort documents by type sorts into Receipts, Invoices, Contracts, IDs, Screenshots and Other.
To see what is inside before deciding, Batch › Copy folder tree writes a Markdown tree, and Batch › Folder size report writes a text report. Batch › Find duplicates reports duplicates after the flatten.
Doing it by hand
In Finder you can search inside the folder, select the results and drag them into a new folder, which works but needs care and moves rather than copies. Terminal's find command can copy files out in one line, but name clashes can overwrite files. The copy-only approach in FileDial avoids losing anything.
Planning for name clashes
Flattening collapses a directory tree, a hierarchy where directories hold files and other directories, into one level. The paths that kept names unique disappear. Two files called IMG_0001.jpg from different subfolders can no longer share a folder under the same name. The tool's note says it copies every file into one new folder but does not describe clash handling, so verify rather than assume.
A simple check: count files in the original tree with Finder's Get Info on the folder, count the items in the new folder, and compare. If the counts differ, find the clashes before you delete anything. Running Rename › Add date prefix or Rename › Rename with sequence… on the flat folder afterwards makes names distinct going forward.
Common mistakes and when FileDial fits
Collecting photos scattered over dated subfolders into one folder for a contact sheet. Pulling every document out of a project tree to send. Preparing a folder of mixed files for Batch › Sort into folders by type. Or feeding a tool that does not read subfolders. In each case the point is to see everything at once.
If the real goal is to reduce clutter, flattening and then Batch › Find duplicates gives you a single place to review the copies. If the goal is sharing, Archive › Make ZIP on the flat folder is the follow-up, and Archive › Deliverable package… adds a README.txt and a SHA-256 manifest inside the ZIP.
It is right for pulling files out of nested folders safely, because it copies and leaves the tree intact. If you only have a few subfolders, dragging files out in Finder is quicker.
The tool is poor for trees where folder names carry meaning, such as client names or years, because flattening discards them. In that case consider Batch › Sort into folders by type or by date, or add the folder name into the file name with a rename step before flattening.
Flattening a tree where folder names carry meaning, then discovering that context is gone, is the first. Second is not checking for clashes. Third is flattening a folder that contains an app, a git repository or a library package, which makes the pieces useless: avoid those. Fourth is not leaving space on the disk, since a copy of a large tree needs room.
Check free space before you start with Batch › Folder size report, and exclude folders such as .git or node_modules by choosing a more specific top folder.
Questions
Does Flatten folder move or copy my files?
It copies every file into one new folder, according to the tool's note, so your original tree and its files stay as they were. That means you can flatten, check the result, and only then decide whether to clean up the originals yourself.
What happens when two files share the same name?
The tool's note does not say how clashes are handled, so verify. Compare the number of files in the original tree with the number in the new folder. If the counts differ, look for same-name files from different subfolders before you delete anything or rely on the result.
What if I want files grouped rather than all in one place?
Use Batch › Sort into folders by type, Batch › Sort into folders by date or Batch › Sort documents by type, which copy files into sorted folders in a new folder. The date version sorts by creation month, and the documents version uses Receipts, Invoices, Contracts, IDs, Screenshots and Other.