Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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 renaming

The 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.