Click here to Skip to main content
15,888,242 members

Comments by Member 9842745 (Top 3 by date)

Member 9842745 30-May-22 7:32am View    
could you give me some suggestions on what changes should I make in my code to incorporate the suggested idea.
I tried introudcing the ctr variable,but the end value of ctr comes out to be 1726 which is the total no of files in the entire root folder.
Member 9842745 30-May-22 6:19am View    
actually I was thinking of adding a numeric suffix.For example if there are 3 files in the folder,then suffix should be _0,_1 and _2.But when I try to print the no files in that directory.Do you think that might work?
Member 9842745 30-May-22 0:31am View    
Hi richard,I have attached my current solution can you recommend what changes I need to make in it
With this I am able to get a list of all the directories as well as the file names in the directory.
But when I try to rename the files I end up getting the following error
```
Cannot create a file when that file already exists: 'D:/synthetic_photo/synthetic_data\\10' -> 'D:/synthetic_photo/synthetic_data\\caucasian_male.jpg
```
Also tried using glob.glob option to list all files in root directory but that is not working also.