Skip to content

Commit

Permalink
Update documentation to explain deduplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
Mia A authored and Mia A committed Aug 5, 2024
1 parent 31aeec5 commit 6eb29e9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## [Unreleased]
- Added a new conflict mode `deduplicate` which skips duplicate files amd renames non-duplicates

## v3.2.5 (2024-07-09)

Expand Down
15 changes: 15 additions & 0 deletions docs/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ rules:
on_conflict: overwrite
```

Use a placeholder to copy all .pdf files into a "PDF" folder and all .jpg files into a "JPG" folder. If two files share the same file name and are duplicates, the duplicate will be skipped. If they aren't duplicates, the second file will be renamed.

```yaml
rules:
- locations: ~/Desktop
filters:
- extension:
- pdf
- jpg
actions:
- copy:
dest: "~/Desktop/{extension.upper()}/"
on_conflict: deduplicate
```

Copy into the folder `Invoices`. Keep the filename but do not overwrite existing files.
To prevent overwriting files, an index is added to the filename, so `somefile.jpg` becomes `somefile 2.jpg`.
The counter separator is `' '` by default, but can be changed using the `counter_separator` property.
Expand Down

0 comments on commit 6eb29e9

Please sign in to comment.