Skip to content

Latest commit

 

History

History
executable file
·
47 lines (31 loc) · 1007 Bytes

README.md

File metadata and controls

executable file
·
47 lines (31 loc) · 1007 Bytes

svach

Sanitize file name

Library

Documentation

CMD - Installation

go get github.com/nilsocket/svach/cmd/svach

CMD - Usage

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)

Difference between Name and Clean

Name

Creates a valid file name for all operating systems.

❯ svach -n 'Hello___World!!!!!/\\'
Hello___World!!!!!

Clean

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!