Skip to content

Sanitize filenames across different operating systems consistently

License

Notifications You must be signed in to change notification settings

nilsocket/svach

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

Sanitize filenames across different operating systems consistently

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages