A command-line utility written in Bash that recursively renames files and folders to be NTFS-compliant and compatible with Windows. It sanitizes names by replacing forbidden characters, trimming trailing spaces and dots, and optionally truncating names to a specified maximum length.
- Recursively scans a target folder and its subdirectories
- Replaces forbidden NTFS characters (
< > : " / \ | ? *) with underscores - Trims trailing spaces and dots
- Supports dry-run mode for safe simulation
- Allows setting a maximum name length (default: 255)
- Optional logging of all operations
- Packaged as
.deband.rpmfor easy installation
sudo dpkg -i ntfscomp_<version>.debsudo rpm -i ntfscomp-<version>.rpmntfscomp --folder /path/to/target-f, --folderPath to the target folder (required)-d, --dry-runSimulate renaming without making changes-L, --lengthMaximum name length (default: 255)-l, --logEnable logging (saved to$HOME/rename_log.txt)--helpShow help message
ntfscomp --folder ~/Downloads --dry-run --logIf logging is enabled (--log), all rename operations are saved to $HOME/rename_log.txt.
- Only files and folders with names requiring changes are renamed.
- Dry-run mode does not modify any files.
- The script does not overwrite existing files; it skips renames if the target name already exists.
MIT License
Pull requests and issues are welcome!
Made with ❤ by:
- gioxmama