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: 17 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-10-04T15:49:59.306Z (about 1 month ago)
- Size: 1.42 MB
- Stars: 14
- 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.