Skip to content

LuisPalacios/sanato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sanato

MacOSX (command line) program that allows you to sanitizes file/directory names which are invalid under SMB Shares. This program runs recursively from current working directory looking for file or directory names that includes any of the WARNING or MUST-SWAP characters, if any of the "WARNING" chars are found they will be logged, if any of the MUST-SWAP are found AND the '-s' option is present then those chars in the path will be swapped by '-'.

Usage: sanato [OPTIONS] <argument> [...]
   -s, --sanitize                Rename last path components
   -v, --verbose                 Increase verbosity
   --version                     Display version and exit
   -h, --help                    Display this help and exit

Looks for the following sets of characters:

WARNING SET     |?*<":>/
MUST-SWAP SET   :?

Installation and Usage

Download sanato-1.03.zip or download this repo and compile with XCode. Place the executable into your PATH. Open a terminal session and run in any of your directories. First without arguments so it will run in dryrun mode, telling you what it would do without doing it. When you are ready and happy with the tentative renamings then just run it with -s option.

Disclaimer

This is extremely destructive software, renaming files can be very dangerous as it may rename files under BUNDLE's or Application Bundles in MACOSX. Please use it only if you know what you are doing. The objective of this program was to sanitizes invalid filenames inside directories in remote SMB shares.

LICENSE

Licensed under The MIT license


About

MacOSX cmd line to sanitizes file/directory names

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published