Folder Flattener And Unflattener For Use With Adobe® Bridge®

Free script for use with Adobe® Bridge®. Script by Kris Coppieters

Version 1.0.1
March 6, 2026


What Does It Do?

Photographers and designers often end up with images buried inside multiple levels of subfolders, organised by shoot, day, card, or camera body. Adobe® Bridge® has no built-in way to collapse that structure into a single folder for culling or delivery.

FolderFlattener adds two commands to Adobe Bridge that solve this in seconds:

  • Flatten Subfolders…: moves every file from every subfolder into the parent folder, renaming files automatically to prevent collisions, and saving a full record of the original structure.
  • Unflatten (Restore)…: reads that record and perfectly reverses the operation, putting every file back exactly where it came from.

Both commands are available in the Tools menu and in the right-click context menu when you click a folder icon.

1-minute YouTube demo:
https://tur.nz/1p


Download

⬇ Download FolderFlattener 1.0.1 (ZIP)

The ZIP contains:

  • FolderFlattener.jsxbin: the script file
  • README.md: quick reference in Markdown format
  • README.pdf: quick reference in PDF format

Requirements

Application Adobe Bridge CC 2020 or newer
Operating system macOS or Windows
Permissions Read/write access to the target folder

Installation

Step 1. Copy the script file

Copy FolderFlattener.jsxbin into your Adobe Bridge Startup Scripts folder.

Replace <version> with your installed version, for example Bridge 2024.

If the Startup Scripts folder does not exist, you should create it.

macOS:

~/Library/Application Support/Adobe/Bridge <version>/Startup Scripts/

Windows:

%AppData%\Adobe\Bridge <version>\Startup Scripts\

Step 2. Enable the script

Open Adobe Bridge and go to Preferences → Startup Scripts. Find FolderFlattener in the list and make sure it is checked.

If Adobe Bridge shows a prompt asking whether to enable the newly found script when it restarts, click Yes.

Step 3: Start or restart Adobe Bridge

Quit Adobe Bridge completely and relaunch it.

The Flatten Subfolders… and Unflatten (Restore)… commands will now appear in Tools and in the folder right-click menu.


How To Use

Flatten

  1. In Adobe Bridge, navigate to the folder you want to flatten.
  2. Choose Tools → Flatten Subfolders…,
    or right-click a folder icon and choose Flatten Subfolders….
  3. Review the confirmation dialog. It shows the root folder path, the number of subfolders, and the total file count.
  4. Click Flatten to proceed.

The script will:

  • Assign each subfolder a short numeric code (e.g. 001, 002, 003).
  • Move every file into the root folder, inserting the folder code before the file extension to avoid name collisions. For example, photo001.jpg from subfolder 002 becomes photo001.002.jpg.
  • Save a restore file named _flatten_undo.json in the root folder.
  • Delete the now-empty subfolders, if possible. Occasionally, folders won’t be deleted (e.g. if you have the same folder open in the Finder or Explorer, or if they contain invisible items), but that does not negatively affect the flatten/unflatten functionality.
  • Refresh the Adobe Bridge view automatically.

Unflatten (Restore)

  1. In Adobe Bridge, open the folder you previously flattened.
  2. Choose Tools → Unflatten (Restore)…,
    or right-click a folder icon and choose Unflatten (Restore)….
  3. Review the confirmation dialog. It shows the original flatten date and the number of files to restore.
  4. Click Restore to proceed.

The script reads _flatten_undo.json and:

  • Recreates the original subfolder structure.
  • Moves every file back to its original location and renames it back to its original name.
  • Deletes _flatten_undo.json once the restore is complete.
  • Refreshes the Adobe Bridge view automatically.

Notes

  • Which folder is targeted? If you have a single folder thumbnail selected in Adobe Bridge, that folder is targeted. Otherwise, the currently open folder in Adobe Bridge is targeted.
  • The restore file is the key. _flatten_undo.json must remain in the root folder for Restore to work. Do not rename, move, or delete it.
  • Flatten cannot run twice. If _flatten_undo.json already exists, the script will alert you and stop. Run Restore first.
  • Files already in the root folder are included in the operation and receive the code 000.
  • Hidden folders (names beginning with .) are skipped entirely.

Troubleshooting

The Flatten and Unflatten commands do not appear in the menus.

  • Confirm that FolderFlattener.jsxbin is in the correct Startup Scripts folder for your version of Adobe Bridge.
  • Go to Preferences → Startup Scripts and verify the script is enabled.
  • Restart Adobe Bridge completely (quit and relaunch).

Unflatten says it cannot find the restore file.

  • Make sure you are browsing the exact folder that was flattened, i.e. the folder that contains _flatten_undo.json.
  • If _flatten_undo.json is missing it has been moved or deleted, and Restore cannot proceed. The files remain in the flattened state.

Flatten stops partway through and reports an error.

  • This can happen if Adobe Bridge does not have write permission on the folder, or if a file is locked or in use by another application.
  • The restore file is only written after all moves complete successfully. If the operation was interrupted, the folder may be in a partially flattened state. Check the alert message for details on which file caused the problem.

Change Log

Version 1.0.1 – March 6, 2026.

Handle .DS_Store files on Mac. These were blocking folder removal during flattening.

Version 1.0.0 – March 5, 2026.

Initial release.


Disclaimer

This software is provided as-is, without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you.

Good computer practice dictates that any program be thoroughly tested with non-critical data before relying on it. The user assumes the entire risk of using the program.


License

Copyright © 2026 Kris Coppieters / Rorohiko Ltd. All rights reserved.

You may make and distribute as many copies of this software as you wish, provided you distribute it in its original unmodified form and at no charge.

You may not charge for, request donations for, or bundle this software with other products (commercial or otherwise) without prior written permission from Rorohiko.

This entry was posted in 2026 and tagged . Bookmark the permalink.