Go to file
2023-08-22 22:26:03 +02:00
LICENSE Initial commit 2023-08-22 22:21:44 +02:00
README.md Update README.md 2023-08-22 22:26:03 +02:00

bulk-string-replacer

bulk-string-replacer is a tool designed to traverse directories and perform bulk string replacement in filenames, folder names, and file contents. Whether you want to target hidden items, preview changes before execution, or recursively navigate through folders, this versatile utility has you covered.

Author

Kevin Veen-Birkenbach

For more context on how this tool was developed, you can view the original conversation here.

Setup and Usage

  1. Clone the repository:

    git clone https://github.com/kevinveenbirkenbach/bulk-string-replacer.git
    
  2. Navigate to the cloned directory:

    cd bulk-string-replacer
    
  3. Run the script with Python:

    python replace_string.py [path] [old_string] [new_string] [options]
    

Options:

  • --recursive: Replace in all subdirectories and files.
  • --folder: Replace in folder names.
  • --files: Replace in file names.
  • --content: Replace inside file contents.
  • --preview: Preview changes without making actual replacements.
  • --verbose: Verbose mode - view detailed outputs.
  • --hidden: Target hidden files and folders.

For more detailed options, refer to the inline script help or the aforementioned conversation.

License

This project is licensed under the GNU Affero General Public License v3.0. The full license text is available in the LICENSE file of this repository.