SpInvalidFileNameFinder is a command-line tool written in Go that helps you find and optionally rename files and folders with invalid names for SharePoint.
- Find files and folders with invalid names for SharePoint.
- Log invalid file and folder names to a log file.
- Optionally rename files and folders with invalid names.
- Specify the directory to process or use the current working directory by default.
- Skip files and folders that start with a tilde (~).
- Skip files and folders that start with a dot (.).
To install SpInvalidFileNameFinder, make sure you have Go installed on your system, and then run the following command:
go get github.com/yourusername/SpInvalidFileNameFinder
To use SpInvalidFileNameFinder, navigate to the directory containing the main.go
file and run the following command:
go run main.go [flags]
-rename
: Enable renaming of files and folders with invalid names (default:false
).-dir
: Specify the directory to process (defaults to the current working directory).
-
To find invalid file and folder names without renaming them:
go run main.go
-
To find invalid file and folder names and rename them:
go run main.go -rename
-
To find invalid file and folder names in a specific directory:
go run main.go -dir "/path/to/your/directory"
-
To find invalid file and folder names in a specific directory and rename them:
go run main.go -dir "/path/to/your/directory" -rename
SpInvalidFileNameFinder logs the invalid file and folder names to a file called invalid_filenames.log
in the directory being processed.
SpInvalidFileNameFinder is released under the MIT License.