demand : According to the modified keil engineering , Change other projects together
cFileNumber: Indicates the number of files found
import os
cFileNumber = 0
dir = './' # The path where the project is located
#dir = 'D://BuildArea//10031799_MT62P3_MiniAPP//10031799_HAL' # Absolute path
for root, dirs, files in os.walk(dir): # Traverse the folder
for file in files: # Traverse the newly obtained file name files
(filename, extension) = os.path.splitext(file) # Split the file name into file name and suffix
if (extension == '.uvprojx'): # Determine whether the suffix is .c file
cFileNumber= cFileNumber+1 # Record .c The number of files is the corresponding file number
print(cFileNumber, os.path.join(root,filename)) # Output file number and corresponding path plus file name
#print("PLACE_RAM(" + filename + ')') # With PLACE_RAM( file name ) Format output file name