0

I have a Dataset of 1000 images and its respective 1000 labeled files. The 1000 images are in .jpg format and the 1000 label files are in .txt format. I want to change the filename of all the (1000) images and all the (1000) label files as follows:

Dataset (Currently) 001.jpg 001.txt 002.jpg 002.txt ...

Desired Result Cam03_001.jpg Cam03_001.txt Cam03_002.jpg Cam03_002.txt ...

And want to do this for all the images (.jpg files) and all the label files (.txt files), I want them to retain all the data and simply edit the filename, by adding "Cam03_" before original name. I am working on Python hoping for a solution on Python.

  • Question misses clarity...Deosn't matter how many times I read I keep getting confused...Pls add how our sample dataset look like with column names as Data Frame & How your desired output should like with more examples... – Bhargav - Retarded Skills Oct 12 '22 at 05:59
  • Please provide enough code so others can better understand or reproduce the problem. – Community Oct 12 '22 at 06:36
  • This answer tells how to rename a file in python https://stackoverflow.com/a/2491232/12902578. – jp1527 Oct 18 '22 at 08:58

0 Answers0