Sanitize file name
go get github.com/nilsocket/svach/cmd/svach
svach # print intended file name changes (Clean)
svach -r # print intended file name changes recursively (Clean)
svach -c # change intended file names (Clean)
svach -c -r # change intended file names recursively (Clean)
svach -n # print intended file name changes (Name)
svach -c -n -r # change intended file names recursively (Name)
Creates a valid file name for all operating systems.
❯ svach -n 'Hello___World!!!!!/\\'
Hello___World!!!!!
Creates a valid file name and removes all control characters, repeated separators (_
, -
. +
, \
, !
,
).
Different kinds of space are replaced with normal space character.
❯ svach 'Hello___World!!!!!/\\'
Hello_World!