i have this working code but it doesnt do the whole job at the moment, currently the code creates 30 files and write them too but i couldnt manage yet to rename each file of those 30 files to readme.ini and put it in its folder (which is the DB number shown in list)
what im trying to do is to create those 30 files and place each one of them in its folder which named as its DB number
e.g. the file with info belongs to DB number "5030" should be placed in folder named "5030", all those DB numbers mentioned in the list folders are already created in a folder in my desktop where the path is C:\Users\Administrator\Desktop\readme1\
import datetime
SchoolDB = [5002, 5006, 5020, 5021, 5022, 5025, 5028, 5030, 5102, 5103, 5104, 5105, 5109, 5117, 5119, 5120, 5121, 5126,
5130, 5131, 5132, 5133, 5134, 5135, 5136, 5137, 5205, 5211, 5238, 5244]
print (SchoolDB)
todayd = datetime.datetime.now().strftime ("%#d/%#m/%Y")
todayt = datetime.datetime.now().strftime ("%H:%M:%S")
for x in SchoolDB:
dbs = open("%s.ini" % x, 'w+')
dbs.write("%s \n%s \n\n%s \n%s \n\n%s \n%s \n" % ('[SCHOOL]',x,'[DATE]',todayd,'[TIME]',todayt))
i expect the loop to create readme.ini file with specific info for each DB number in the list and place this readme.ini file in its DB number folder.