Skip to content

Python script for renaming files in a directory by appending a specified name to the file's existing name. It's particularly useful for batch renaming PDF files, but can be extended for other file types as well. The script leverages Python's os module to traverse and rename files in the specified directory.

Notifications You must be signed in to change notification settings

sosmongare/file-renamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Repository Description:

Repository Name: file-renamer

Description: This repository contains a Python script for renaming files in a directory by appending a specified name to the file's existing name. It's particularly useful for batch renaming PDF files, but can be extended for other file types as well. The script leverages Python's os module to traverse and rename files in the specified directory.


README.md File:

You can use the following as your README.md file:

# File Renamer

This repository contains a Python script for renaming files in bulk by appending a custom name to the existing file names. The script is designed to work with PDF files, but can be adapted for other file types.

## Features

- Renames files by appending a specified string to their names.
- Automatically handles file extensions (currently set for `.pdf` files).
- Simple and easy to customize.

## How to Use

1. Clone the repository:

   ```bash
   git clone https://github.com/sosmongare/file-renamer.git
  1. Navigate to the project directory:

    cd file-renamer
  2. Modify the directory path in the script to point to your folder containing the files to rename.

    In rename_files.py, update the directory variable to the path where your files are located:

    directory = '/path_to_your_folder/Sos Documents'
  3. Run the script:

    python rename_files.py

    The script will rename all PDF files in the directory, appending " - Sospeter Mongare" to their names.

Example

If you have a file named Id Card.pdf, after running the script, it will be renamed to:

Id Card -Sospeter Mongare.pdf

Requirements

  • Python 3.x
  • Works on Linux, macOS, and Windows.

License

This project is open-source and available under the MIT License.

About

Python script for renaming files in a directory by appending a specified name to the file's existing name. It's particularly useful for batch renaming PDF files, but can be extended for other file types as well. The script leverages Python's os module to traverse and rename files in the specified directory.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages