DuplicateFilesAndFolders
Finds and deletes duplicate files and folders, written in Java with an Eclipse SWT/JFace GUI
Install / Use
/learn @lwiest/DuplicateFilesAndFoldersREADME
DuplicateFilesAndFolders
DuplicateFilesAndFolders is an open-source tool to find and (optionally) delete duplicate files and folders, written in Java.
It identifies duplicate files and folders by calculating and comparing file hashes (something that Git does, too). For easy operation, DuplicateFilesAndFolders provides an Eclipse SWT/JFace-based graphical user interface.
I developed DuplicateFilesAndFolders on Windows 7 (64-bit), but it should be easy to port it to other platforms.
Enjoy — Lorenz
Table of Contents
Getting Started
Prerequisites
- You are running a Windows (64-bit) system.
- You have installed Java JDK (or SDK) 7 (64-bit) or higher on your system.
Instructions
-
Download DuplicateFilesAndFolders.jar to a folder.
-
Open a command prompt in that folder and enter
java -jar DuplicateFilesAndFolders.jar -
This runs DuplicateFilesAndFolders.
Usage
<img src="pics/image1.png" width="660"/>- Enter or choose a folder to scan.
- Click Find Duplicates to scan the folder.
- Inspect the list of duplicate folders.
- Inspect the list of duplicate files.
- Duplicate items are grouped by background color.
- Select a duplicate item for deletion.
- Child items of selected items are automatically selected and dimmed.
- (Optional) Choose one of the following:
- Select all items.
- Select all but one item of each duplicate item.
- Deselect all items for deletion.
- Invert your selection.
- (Optional) Open a folder (or the containing folder of a file) with the context menu.
- Open the Confirm Deleting Items dialog.
- Confirm to delete the selected items.
- Delete the selected items.
[!CAUTION] Like with all software able to delete files, you are using DuplicateFilesAndFolders at your own risk.
Build Instructions
Prerequisites
- You are running a Windows (64-bit) system.
- You have installed Java SDK 7 (64-bit) or higher on your system (I used Java SDK 8 (64-bit)).
- You have installed an Eclipse IDE on your system (I used Eclipse 4.5.0 “Mars” (64-bit)).
Instructions
- Download this project’s ZIP file from GitHub.
- Unzip it to a temporary folder.
- Import the
DuplicateFilesAndFoldersproject from the temporary folder into your Eclipse IDE as an import source General > Existing Projects into Workspace. - In the Project Explorer view, right-click DuplicateFilesAndFolders and select Run As > Java Application.
- The DuplicateFilesAndFolders application starts.
- If you like to create a
DuplicateFilesAndFolders.jarJAR file, continue: - Close the DuplicateFilesAndFolders application.
- In the Project Explorer view, right-click DuplicateFileAndFolders and select Export....
- Select Java > Runnable JAR file.
- Click Next >.
- Under Launch Configuration, select DuplicateFilesAndFolders - DuplicateFilesAndFolders.
- Under Export destination, enter the full pathname of the exported application, for example
C:\TEMP\DuplicateFilesAndFolders.jar. - Select the radio button Package required libraries into generated JAR.
- Click Finish.
- Use a file explorer to find the exported JAR file
DuplicateFilesAndFolders.jar.
Porting Tips
To port DuplicateFilesAndFolders to another platform, apply the following changes:
- Adjust in method
Utils.getInitialFolderToScanPath()the string that is shown as the initial folder path. - Adjust in method
Utils.getExplorerCommandLine()the command-line string that launches the file explorer, opening a specific folder. - Replace the SWT library
org.eclipse.swt.win32.win32.x86_64_XXX.jarwith the SWT library specific to your platform. (The library name follows the patternorg.eclipse.swt.<platform>_<version>.v<timestamp>.jar.)
License
This project is available under the MIT license.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
