Skip to content

aquenneville/synology-dsm-file-duplicate-remover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

synology-dsm-file-duplicate-remover

I created this utility to delete the files duplicate in one go by keeping the first version found because the dsm only allowed to delete each individual file one by one. I added the possibility to do a dry-run (no deletion) before actually running the real deletion. No body likes to delete the wrong files :)

Enabling the duplicate file reporting

  • From the main menu > click the Storage Analyzer
  • Under Report profile > click Create
  • In the storage usage report wizard > type in a name for the report and tick Duplicate file candidates.
  • Define the frequency and tick generate now.
  • Click on the report task, and then click view complete report
  • Finally, you should be in the Disk Usage Report|Duplicate File Candidates report a csv download link should be displayed on the right.
  • The dsm download link should look like : https://ip:port/dar/duplicates/YYYY-MM-DD_NN-NN-NN/report.html?SynoToken=XXXXXX

Content of the csv

Group,Shared Folder,File,Size,Modified time

1,photo,/volume1/photos/album1/1.png,300 Mb,2018-03-27 22:30

1,photo,/root/1.png,300 Mb,2018-01-01 19:00

1,photo,/mnt/1.png,300 Mb,2018-01-01 19:00

It's true, I could have sorted the duplicate files by "shared folder" or "modified time" before deleting, this could be an improvement for later.

Installation

Git clone on your Dsm, and build the jar with maven in /root.

Inside the Dsm run the reporting and download the csv in the location of this jar.

Requirements

Features

  • Duplicate files remover
  • Test run possible with -dry_run option
  • Compatible with Synology DSM 213j+

Screenshots

Usage

java -jar SynoFileDuplicateRemover.jar -csv_file [file.csv] -dry_run

-csv_file: (mandatory) name of csv containing the list of duplicate files generated by the Nas.

-dry_run: (optional) no argument, test run no deletion.

Post-installation

Configure cron task

TODO

  • Tests with French characters
  • Add csv file
  • Add screenshots

About

File duplicate remover for Synology DSM 213j+

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages