May-28-2018, 08:15 PM
If the files in your second folder are defining the names, then you can read the files of this folder (see: https://stackoverflow.com/questions/3207...-directory)
since the last digits of the files in both folders match you can use the split function on the .jpeg file names
for example
since the last digits of the files in both folders match you can use the split function on the .jpeg file names
for example
some_file_2dir = '07_2506.jpeg' new_name = '%s.xml'%some_file_2dir.split('_')[1].split('.')[0]and since you can call system functions like the move command mv you can then move the files of the first folder to the same location but with the new_name. Remember to check the names of the files in the first directory :)