From 4c279cd054562d41edcff40a470093806da4b075 Mon Sep 17 00:00:00 2001 From: rlogwood Date: Fri, 7 Jun 2024 16:42:48 -0400 Subject: [PATCH] add more info for usage --- windows/frd.ps1 | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/windows/frd.ps1 b/windows/frd.ps1 index f14fe83..786849e 100755 --- a/windows/frd.ps1 +++ b/windows/frd.ps1 @@ -1,13 +1,5 @@ # Find and Remove Duplicates -# This is the directory we'll check for duplicates -# TODO: make this a parameter - -#$check_dir = "C:\Program Files\Microsoft Office\Updates\Download\PackageFiles" -#$backup_dir = "C:\Users\richa\tmp\backups3" - -# = "C:\Program Files\Microsoft Office\Updates\Download\PackageFiles", - # = "C:\Users\richa\tmp\backups3" param ( [string]$check_dir, @@ -21,12 +13,23 @@ param ( function ShowUsage { $message = @" -Find and Remove Duplicates usage: +Find and Remove Duplicates usage: + +** Use with caution ** + frd.ps1 -check_dir [-delete -backup_dir (backup location)] [-show_dups] -check_dir (where to look for duplicates) -backup_dir (location to backup files before deletion) -delete # will delete the duplicates -show_dups # will show the duplicates + + ** A typical dirctory to check would be the Office downloads directory: + -check_dir 'C:\Program Files\Microsoft Office\Updates\Download\PackageFiles' + + ** The backup directory can be any writable location, the destination directory is created: + -backup_dir 'C:\tmp\backups' + + ** Files can only be deleted if you have the needed privledge "@ Write-Output $message