The folder is read in your browser. Nothing is uploaded and nothing moves until you say so.
About flattening nested folders
You unzip an archive and get project/ containing project/ containing src/ containing the four files you actually wanted. Or a download arrives as one folder per item, each holding a single file. Or a backup restores a directory tree that made sense to the machine that wrote it and to nobody since.
Flattening is the fix: bring every file up to the top level, whatever depth it is buried at. Doing it by hand means opening each folder, selecting, cutting, going up, pasting, and repeating — and then dealing with the name clashes one dialog at a time.
This tool plans the whole thing first, shows you every file and the name it will come out as, and then either does it in the page or hands you a script.
The hard part is the names
Flattening 2023/report.pdf and 2024/report.pdf gives you two files called report.pdf in one folder, and only one of them can survive. So the naming rule is a real choice rather than a footnote:
- Add the folder name only when it would clash — the default, and what people usually want. holiday.jpg stays holiday.jpg, and only the three copies of IMG_0001.jpg become 2023_IMG_0001.jpg, 2024_IMG_0001.jpg and so on. Nothing is renamed that did not need to be
- Always add the folder name — every file gets its path folded into the name. Uglier, but completely predictable, and it keeps the original location visible in the filename
- Keep names as they are — no renaming at all. Anything that would clash is blocked and left exactly where it is
The Join with box sets the character used to fold the path in, so you can have 2023_report.pdf or 2023-report.pdf to taste.
How to use it
- Click Choose a folder to flatten and pick it. Your browser will ask permission to read it
- Choose the naming rule — the table redraws as you change it, so you can compare
- Read the plan: where each file is buried, and what it comes out as. Renamed files are highlighted
- Press Bring the files up now, or download a .bat / .sh script to run yourself
Nothing is deleted, including the empty folders
Flattening leaves behind the folders it emptied. That is deliberate.
Deleting a folder tree is a different kind of action from moving files, and bundling the two would mean this tool quietly removed directories while you were thinking about filenames. So the shells stay, and if you want them gone the Empty Folder Finder will find them — with its own preview, and its own script you read before running.
Two deliberate acts instead of one silent one.
Moving here, or a script
Chrome, Edge and Opera can be granted write access to the folder you chose, so the files are moved in the page with nothing to install. The browser asks first, and you can revoke it whenever you like.
Firefox and Safari have no way to do that and get a script instead — a .bat for Windows or a .sh for Mac and Linux. Both refuse to overwrite: move prompts on Windows, mv -n declines on Mac and Linux. You read it before you run it.
What people use it for
- Undoing an archive that unzipped five levels deep around a handful of files
- Collapsing a download that arrived as one folder per file
- Getting a photo import out of its date-named folders and into one place
- Pulling every file out of a restored backup whose structure no longer means anything
- Preparing a folder for a tool that will not recurse into subfolders
- Merging per-chapter or per-section exports into a single folder
Good to know
- Works on Windows, macOS, Linux and ChromeOS — it is a web page, so there is nothing to install. It cannot work on iPhone, iPad or Android: mobile browsers have no way to hand a folder to a web page
- Nothing is uploaded. Reading, planning and moving all happen in the page
- Moving is reversible — the same bytes in a different place. No file is deleted, ever
- Files already at the top level are left alone rather than moved onto themselves
- Characters Windows forbids are replaced when a path is folded into a name, so a/b becomes a-b rather than a failed move
- The Windows script starts with chcp 65001 so folder names with accents or non-Latin characters survive
- Very large folders are capped at 200,000 items so the page cannot freeze
- The table shows the first 400 rows; the script always contains every file
Related tools
- Empty Folder Finder — clear the shells left behind afterwards
- Sort Files Into Subfolders — the opposite job, when a flat folder needs structure
- Bulk File Rename — tidy the names once everything is in one place
- Duplicate File Finder — flattening often reveals copies you did not know about