Make filenames web safe
Case: I want to upload some files to a webserver, but I want all the files to be clean and web safe.
We need to use four methods to do the following:
- Make everything lowercase.
- Remove diacritics.
- Replace non-word character with - (dash).
- Replace any repeating dashes with a single dash.
Do the following:
- Add the files to the list.
- If there are methods in the method list click the Clear Methods toolbar button.
- Click Add Method and select New case Method.
- Set the "New case" dropdown to "Lowe case" and set "Location" to "All". Set "Apply to" to "Name and extension"
- Click Add Method again and select Remove Method.
- Set the "Remove type" dropdown to "Accents and special marks".
- Click Add Method once again and select Replace Method.
- Set "Replace" to [^a-zA-Z0-9_-].
- Set "Replace with" to -.
- Set "Occurrence" to "All".
- Set "Use regular expressions" to "Checked".
- Set "Apply To" to "Name".
- Click Add Method once again and select Replace Method again.
- Set "Replace" to -+.
- Set "Replace with" to -.
- Set "Occurrence" to "All".
- Set "Use regular expressions" to "Checked".
- Verify the names in the list.
- Click Start Batch.