Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slhck/sanitize-filenames
macOS workflow to sanitize filenames
https://github.com/slhck/sanitize-filenames
Last synced: 2 days ago
JSON representation
macOS workflow to sanitize filenames
- Host: GitHub
- URL: https://github.com/slhck/sanitize-filenames
- Owner: slhck
- Created: 2021-03-16T08:55:48.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-03-16T08:58:43.000Z (over 3 years ago)
- Last Synced: 2024-12-03T02:54:25.749Z (10 days ago)
- Size: 1.42 MB
- Stars: 15
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- project-awesome - slhck/sanitize-filenames - macOS workflow to sanitize filenames (Others)
README
# sanitize-filenames
macOS workflow to sanitize filenames.
A workflow that you can use to handle weird characters in filenames.
## Usage
- Download the zip file
- Extract the app
- Run the app
- It'll ask you for a folder name
- Done## What it does
It creates a Workflow applicatoin doing the following:
- Asks for Finder items (you should allow only folders)
- Sets this result as a variable
- It runs a shell script to do the renamingThe script is:
```bash
for f in "$1"/*; do
dir="$(dirname "$f")"
file="$(basename "$f")"
mv -- "$f" "${dir}/${file//[^0-9A-Za-z.]}"
done
```## License
Do whatever you want with this.