15,888,242 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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.