Normalize file names with rename
I get a lot of assets from designers with file names that are inconsistent or not URL friendly.
Here are a few commands to help normalize these file names in bulk, using the Linux or OS X “rename” command line program.
Convert to lowercase:
Replace special characters with hyphens (leaving only alpha-numerics, and @
symbols intact):
Add a space where there is none (e.g. “MyImage.png” becomes “My Image.png”):
Or, altogether (e.g. “My Super???SillyImage@4x.PNG” becomes “my-silly-image@4x.png”)