Skip to content

Finds and deletes duplicate files and folders, written in Java with an Eclipse SWT/JFace GUI

Notifications You must be signed in to change notification settings

lwiest/DuplicateFilesAndFolders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  1. Download DuplicateFilesAndFolders.jar to a folder.

  2. Open a command prompt in that folder and enter

    java -jar DuplicateFilesAndFolders.jar
    
  3. This runs DuplicateFilesAndFolders.

Usage

  1. Enter or choose a folder to scan.
  2. Click Find Duplicates to scan the folder.
  3. Inspect the list of duplicate folders.
  4. Inspect the list of duplicate files.
  5. Duplicate items are grouped by background color.
  6. Select a duplicate item for deletion.
  7. Child items of selected items are automatically selected and dimmed.
  8. (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.
  9. (Optional) Open a folder (or the containing folder of a file) with the context menu.
  10. Open the Confirm Deleting Items dialog.

  1. Confirm to delete the selected items.
  2. 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

  1. Download this project’s ZIP file from GitHub.
  2. Unzip it to a temporary folder.
  3. Import the DuplicateFilesAndFolders project from the temporary folder into your Eclipse IDE as an import source General > Existing Projects into Workspace.
  4. In the Project Explorer view, right-click DuplicateFilesAndFolders and select Run As > Java Application.
  5. The DuplicateFilesAndFolders application starts.
  6. If you like to create a DuplicateFilesAndFolders.jar JAR file, continue:
  7. Close the DuplicateFilesAndFolders application.
  8. In the Project Explorer view, right-click DuplicateFileAndFolders and select Export....
  9. Select Java > Runnable JAR file.
  10. Click Next >.
  11. Under Launch Configuration, select DuplicateFilesAndFolders - DuplicateFilesAndFolders.
  12. Under Export destination, enter the full pathname of the exported application, for example C:\TEMP\DuplicateFilesAndFolders.jar.
  13. Select the radio button Package required libraries into generated JAR.
  14. Click Finish.
  15. Use a file explorer to find the exported JAR file DuplicateFilesAndFolders.jar.

Porting Tips

To port DuplicateFilesAndFolders to another platform, apply the following changes:

  1. Adjust in method Utils.getInitialFolderToScanPath() the string that is shown as the initial folder path.
  2. Adjust in method Utils.getExplorerCommandLine() the command-line string that launches the file explorer, opening a specific folder.
  3. Replace the SWT library org.eclipse.swt.win32.win32.x86_64_XXX.jar with the SWT library specific to your platform. (The library name follows the pattern org.eclipse.swt.<platform>_<version>.v<timestamp>.jar.)

License

This project is available under the MIT license.

About

Finds and deletes duplicate files and folders, written in Java with an Eclipse SWT/JFace GUI

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages