Console/terminal utility that batch-copies files with a new name prefix, supporting Windows 11 and Ubuntu Linux 24.04. Every matching file in the source folder is copied to the target folder with the string given by --prefix prepended to its name. The originals are left untouched, and the target folder is created when it does not exist.

 

[Folder Structure]

  • CLAUDE.md / AGENT.md: program specification (identical content).
  • CHANGELOG.md: change log.
  • copyright.txt: copyright notice.
  • data/from/: source examples (jpg and png).
  • data/to/: the prefixed copies, written by the script.
  • tool/tools.py: shared helpers.
  • src/: source code, launcher scripts and this document.
  • venv/: Python virtual environment, created by step 01.

[Instructions]

1. 01_venv_create.bat / 01_venv_create.sh

Delete the old venv/, create a fresh one and install src/requirements.txt. Aborts loudly if pip fails.

 

2. 02_venv_activate.bat / 02_venv_activate.sh

Activate the virtual environment. On Linux use source src/02_venv_activate.sh.

 

3. 03_batch_rename.bat / 03_batch_rename.sh

Copy every matching file from the --from folder to the --to folder with the prefix.

 

4. 99_venv_clear.bat / 99_venv_clear.sh

Delete the venv/ folder.

 

[Python Entry Point]

src/batch_rename.py

  • --from data/from: source folder
  • --to data/to: target folder
  • --prefix inclusion-: the string prepended to each file name
  • --ext jpg,png: the extensions to process, comma separated

Matches *.{ext} for each comma-separated extension, copies with shutil.copy, and prints every copy plus a final count; the target folder is created when missing.

 

[Quick Start]

Windows 11

src\01_venv_create.bat

src\03_batch_rename.bat

 

Ubuntu Linux 24.04

bash src/01_venv_create.sh

bash src/03_batch_rename.sh

 

For your own files, for example: src\03_batch_rename.bat --from path\to\files --to path\to\output --prefix cat- --ext jpg,png,bmp

 

[References]

This SDK is built in AppForAI - AI Dev Tools.

 

Purchase license separately:  USD 600, permanent authorization, single APP authorization, single machine authorization, one-year activation, one-year download, one-year update, one-year email technical support.