Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/josechirif/mass-file-renaming-with-excel

Rename multiple files as easily as modifying an excel file.
https://github.com/josechirif/mass-file-renaming-with-excel

automation executable python

Last synced: about 1 month ago
JSON representation

Rename multiple files as easily as modifying an excel file.

Awesome Lists containing this project

README

        

MASS FILE RENAMING WITH EXCEL

Generate an automatic excel template with the name of all files in the same folder of your project. Then, rename all of them with one click (as the new value you assing in the excel).

![Mass file renaming intro](https://github.com/user-attachments/assets/a83851ec-b4ee-43c1-a433-60317cde5f2f)



Languages
 
Python version
 
License
 
release


# Table of contents
- [Video instructions (setup + execution)](#%EF%B8%8F-video-instructions-setup--execution)
- [Setup](#%EF%B8%8F-setup)
- [Languages-instructions](#-languages-instructions)
- [Instructions](#-instructions)
- [Documentation and colaboration](#%EF%B8%8F-documentation-and-collaboration)
- [Author](#%EF%B8%8F-author)


# ▶️ Video instructions (setup + execution)

Check the instruction guide on **[this link to YouTube 🎬](https://youtu.be/Ouuhoy1KAoY)**.

It covers the **🛠️ setup** and **📑 execution**, which can be found below in this README.


# 🛠️ SETUP

### 1. Download


Option a: Download the last release



  1. Download the last release.rar


    go to release section
    download the last rar file



  2. Extract the .rar program



Option b: Clone the repository



  1. Clone the repository with the command:
    git clone https://github.com/JoseChirif/Mass-file-renaming-with-excel.git 


### 2. Install requirements


  1. Install virtual environment with command
    python -m venv venv
  2. Activate the virtual environment with
    venv\Scripts\activate
  3. Install dependencies from requirements.txt:
    pip install -r requirements.txt
    (check that your venv is active).


### 3. Execute


Option a: Make a onefile.exe file - RECOMMENDED (Click here)



  1. Run:
    python build_exe.py

    or Run:
    pyinstaller --onefile --windowed --clean --noupx `
    
    --add-data "assets/*;assets" `
    --add-data "config/*;config" `
    --add-data "functions/*;functions" `
    --add-data "instructions/*;instructions" `
    --add-data "locales/*;locales" `
    --add-data "src/*;src" `
    --add-data "LICENSE.txt;." `
    --add-data "README.md;." `
    --add-data "instructions/styles/styles.css;instructions/styles" `
    --add-data "instructions/pictures/1 - Move to folder.png;instructions/pictures" `
    --add-data "instructions/pictures/2 - Main menu.png;instructions/pictures" `
    --add-data "instructions/pictures/3 - excel template.png;instructions/pictures" `
    --add-data "instructions/pictures/4 - Flash fill excel.gif;instructions/pictures" `
    --add-data "instructions/pictures/5 - renaming.png;instructions/pictures" `
    --add-data "instructions/pictures/6 - options to modify names.png;instructions/pictures" `
    --icon "assets/icon.ico" `
    --name "0 rename.exe" `
    "run.py"



  2. Then a "dist" folder will be created in the project's directory, containing a "0 rename.exe" folder. Inside it, you will find the .exe file and the "_internal" folder.
    dist folder with dependecies



Option b: Make a .exe file with dependencies (Click here)



  1. Run:
    pyinstaller --windowed --clean --noupx `
    
    --add-data "assets/*;assets" `
    --add-data "config/*;config" `
    --add-data "functions/*;functions" `
    --add-data "instructions/*;instructions" `
    --add-data "locales/*;locales" `
    --add-data "src/*;src" `
    --add-data "LICENSE.txt;." `
    --add-data "README.md;." `
    --add-data "instructions/styles/styles.css;instructions/styles" `
    --add-data "instructions/pictures/1 - Move to folder.png;instructions/pictures" `
    --add-data "instructions/pictures/2 - Main menu.png;instructions/pictures" `
    --add-data "instructions/pictures/3 - excel template.png;instructions/pictures" `
    --add-data "instructions/pictures/4 - Flash fill excel.gif;instructions/pictures" `
    --add-data "instructions/pictures/5 - renaming.png;instructions/pictures" `
    --add-data "instructions/pictures/6 - options to modify names.png;instructions/pictures" `
    --icon "assets/icon.ico" `
    --name "0 rename.exe" `
    "run.py"



  2. Then the folder "dist" will be created in the project's folder. Inside is the .exe file with the folder "_internal".
    dist folder

  3. Move and keep .exe file with the folder "_internal" together all the time. The .exe file won't work if the "_internal" folder is not in the same directory.



Option c: Execute from python (Click here)



  1. Execute run.py to enter the main menu:
    python run.py




  2. Scripts will modify the name of files in project's parent directory instead of where the executable is.


  3. father's directory




# 🌐 LANGUAGES (instructions):
- [Instructions in **ENGLISH** (click here)](#-instructions)

- [Instrucciones en **ESPAÑOL** (click here)](https://github.com/JoseChirif/Mass-file-renaming/blob/main/instructions/Instructions%20-%20es.md)


# 📑 INSTRUCTIONS
1. Move the executable to the folder where the files you want to modify are located.
![move_to_folder](https://github.com/user-attachments/assets/a186ba66-b2f7-452f-8797-4f054907d76f)
**If you created the folder "_internal", move it together.**

2. With the main menu open you can run all scripts.
![Main menu](https://github.com/user-attachments/assets/74ce9fb0-3c13-4362-8180-7c721d530cb4)

3. The first button will create an excel with the name of all files and folders of the folder where it is.
![excel template](https://github.com/user-attachments/assets/c43eb533-498d-46a5-87d3-1ab98e0f8348)

4. Fill column C of the excel with new names (or leave it empty if you don't wanna change the name).
![Flash fill excel](https://github.com/user-attachments/assets/ec5e8c1a-dc87-49f7-bff6-abe98b32a57c)
> **Tips:**
> - If there is a regex, made 2 or 3 examples and use excel flash fill.
> - If you want to unlock the sheet to use more columns, click on the 3rd button of the main menu does it.

5. The second button will change the original name of all files with the new name assings in the column C of the excel.
![renaming](https://github.com/user-attachments/assets/e8aa9663-363b-4297-aa6f-55cae6d83c77)

**You have 2 options:**

![options to modify names](https://github.com/user-attachments/assets/8d4136fe-5dc2-43c5-875a-fc729e16124d)
- Option 1: Made a new folder (with the same name as the project) and copy all the files with the new name.
- Option 2: Overwrite the files with the new names.

Choose the option that you prefeer.

**WELL DONE, files has been renamed successfully!**

# 🗃️ Documentation and collaboration
**📚 For detailed documentation and collaboration guidelines, please visit the [Wiki!](https://github.com/JoseChirif/Mass-file-renaming-with-excel/wiki)
**
The [Wiki](https://github.com/JoseChirif/Mass-file-renaming-with-excel/wiki) contains everything you need to get started and contribute effectively. Your support and collaboration are greatly appreciated! 🚀✨

# ✍️ Author
[@Jose Chirif](https://github.com/JoseChirif)

## 🚀 About me
I'm an Industrial Engineer specialized in process optimization, business intelligence and data science.
[Porfolio - Network - Contact](https://linktr.ee/jchirif)