A simple Python tool to batch rename .ply files in a folder, changing their prefix and reindexing them sequentially. Useful for datasets with files like soldier_redandblack_0001.ply to rename as square_1.ply, square_2.ply, etc.
- Renames all
.plyfiles in a folder to a new prefix and sequential index - Shows a preview of the first rename and asks for confirmation
- Uses
tqdmfor progress display - Command-line interface with
argparse - Docker support
- Install requirements:
pip install tqdm
- Run the script:
python rename_ply.py /path/to/folder --prefix square
- Build the image:
docker build -t ply-rename . - Run the container (replace
/your/ply/folderwith your folder path):docker run -it --rm -v /your/ply/folder:/data ply-rename /data --prefix square
Given files:
soldier_redandblack_0001.plysoldier_redandblack_0002.ply
After running:
python rename_ply.py /path/to/folder --prefix square
They become:
square_1.plysquare_2.ply
MIT