add more info for usage
This commit is contained in:
@ -1,13 +1,5 @@
|
|||||||
# Find and Remove Duplicates
|
# 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 (
|
param (
|
||||||
[string]$check_dir,
|
[string]$check_dir,
|
||||||
|
|
||||||
@ -21,12 +13,23 @@ param (
|
|||||||
function ShowUsage {
|
function ShowUsage {
|
||||||
$message = @"
|
$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]
|
frd.ps1 -check_dir [-delete -backup_dir (backup location)] [-show_dups]
|
||||||
-check_dir (where to look for duplicates)
|
-check_dir (where to look for duplicates)
|
||||||
-backup_dir (location to backup files before deletion)
|
-backup_dir (location to backup files before deletion)
|
||||||
-delete # will delete the duplicates
|
-delete # will delete the duplicates
|
||||||
-show_dups # will show 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
|
Write-Output $message
|
||||||
|
|||||||
Reference in New Issue
Block a user