Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ntfscomp

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.

🚀 Features

  • 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 .deb and .rpm for easy installation

📦 Installation

Debian/Ubuntu (.deb)

sudo dpkg -i ntfscomp_<version>.deb

Fedora/RHEL (.rpm)

sudo rpm -i ntfscomp-<version>.rpm

🛠 Usage

ntfscomp --folder /path/to/target

Options

  • -f, --folder      Path to the target folder (required)
  • -d, --dry-run      Simulate renaming without making changes
  • -L, --length      Maximum name length (default: 255)
  • -l, --log      Enable logging (saved to $HOME/rename_log.txt)
  • --help      Show help message

Example

ntfscomp --folder ~/Downloads --dry-run --log

📝 Logging

If logging is enabled (--log), all rename operations are saved to $HOME/rename_log.txt.

⚠️ Notes

  • 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.

📄 License

MIT License

🤝 Contributing

Pull requests and issues are welcome!

💡 Author/s

Made with ❤ by:

  • gioxmama

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages