feat(arg): add dry-run argument
Add a dry-run argument so the user can have the script detect duplicates without deleting them. This is useful for informing the user of which files would be deleted, should they run the script, normally.
This commit is contained in:
parent
4c6112f0a7
commit
86d6740302
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
# Duplicate Check
|
# Duplicate Check
|
||||||
# Version: 0.11.0
|
# Version: 0.12.0
|
||||||
|
|
||||||
# Copyright 2025 Jake Winters
|
# Copyright 2025 Jake Winters
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
@ -13,6 +13,7 @@ import argparse
|
|||||||
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Scan directory for duplicate files and delete them.')
|
parser = argparse.ArgumentParser(description='Scan directory for duplicate files and delete them.')
|
||||||
|
parser.add_argument('--dry-run', '-d', action='store_true', help='Detect duplicates without deletion.')
|
||||||
|
|
||||||
|
|
||||||
def hash_file(file_path):
|
def hash_file(file_path):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user