A simple Python script that helps you browse external drives, record folder names, and find duplicate folders either within a drive or across multiple drives.
Finds external drives mounted in /Volumes (macOS). Lets you navigate folder structures on the drive. Allows you to record names of folders in each directory you explore. Stores folder names in a uniquely named log file like DRIVENAME_123456_folders.txt. Compares all recorded logs to find duplicate folder names: Within a single drive Across multiple drives
- Requirements Python 3.x macOS (uses /Volumes and macOS-specific shell commands)
- Run the Script python3 folder_scanner.py If your script is saved under a different name, replace folder_scanner.py accordingly.
When you run the script, you'll see:
--- Folder Scanner ---
- Browse drive and record folders
- Find duplicate folders from scans
- Exit Option 1: Browse & Record Select an external drive Navigate folders like a terminal file explorer Press r to record folder names in the current folder Option 2: Check for Duplicates Scans all previously recorded log files Reports duplicate folder names within and across drives Option 3: Exit Ends the program
Recorded data is stored in text files in the same directory as the script. Hidden folders (starting with .) are skipped. Only folder names, not full paths, are recorded β duplicates are matched by name.
This script was entirely generated by Gemini and ChatGPT
Dushan Cimbaljevic