Python Forum
rename same file names in different directories
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rename same file names in different directories
#1
I have a directory which has 10 other dirs with many files:

- directory
- dir1
- dir2
- dir3
- ...

How can i rename duplicate files from all dirs?
For ex. we have 2 files with name "file1.txt" in "dir1" and "dir2" and we must rename one.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Organization of project directories wotoko 3 419 Mar-02-2024, 03:34 PM
Last Post: Larz60+
  Rename first row in a CSV file James_S 3 578 Dec-17-2023, 05:20 AM
Last Post: James_S
  Navigating file directories and paths inside Jupyter Notebook Mark17 5 687 Oct-29-2023, 12:40 PM
Last Post: Mark17
  rename file RolanRoll 0 530 May-18-2023, 02:17 PM
Last Post: RolanRoll
  '' FTP '' File upload with a specified string and rename midomarc 1 1,151 Apr-17-2023, 03:04 AM
Last Post: bowlofred
  Listing directories (as a text file) kiwi99 1 834 Feb-17-2023, 12:58 PM
Last Post: Larz60+
  Find duplicate files in multiple directories Pavel_47 9 3,067 Dec-27-2022, 04:47 PM
Last Post: deanhystad
  rename and add desire "_date" to end of file name before extention RolanRoll 1 1,237 Jun-13-2022, 11:16 AM
Last Post: gruntfutuk
  I need to copy all the directories that do not match the pattern tester_V 7 2,407 Feb-04-2022, 06:26 PM
Last Post: tester_V
  Functions to consider for file renaming and moving around directories cubangt 2 1,743 Jan-07-2022, 02:16 PM
Last Post: cubangt

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020