https://github.com/prantlf/closest-file-names
Helps finding the same or very similar file names in a directory.
https://github.com/prantlf/closest-file-names
compare filenames levenshtein-distance same
Last synced: 12 months ago
JSON representation
Helps finding the same or very similar file names in a directory.
- Host: GitHub
- URL: https://github.com/prantlf/closest-file-names
- Owner: prantlf
- License: mit
- Created: 2022-04-24T10:27:52.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-24T10:31:06.000Z (about 4 years ago)
- Last Synced: 2025-06-26T00:03:42.422Z (12 months ago)
- Topics: compare, filenames, levenshtein-distance, same
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Find Closest File Names
Helps finding the same or very similar file names in a directory. For every combination of names, it will print:
1. First name and file size in parentheses
2. Second name and file size in parentheses
3. Levenshtein distance between the normalised names
4. First normalised name
5. Second normalised name
6. Empty line
The name combinations will be sorted by the levenshtein distance. The exactly same normalised strings will have the distance set to zero. The string normalisation converts the names to a sequence of words and removes special characters and particles.
## Example
```txt
❯ ./closest-file-names .
7 files
21 combinations
go.mod (54)
main.go (3,833)
3
go mod
go main
.git (288)
main.go (3,833)
5
git
go main
.vscode (96)
go.mod (54)
5
vscode
go mod
...
```