- #1
- 2,168
- 193
I have created this python program to create a desktop.ini file in a test folder and then change the icon of it. However, the program is something like this
but it's not working
Code:
import os
desktop_ini = ["[.ShellClassInfo]\n",
"IconResource=C:\\Users\\Arman\\Desktop\\Coding\\Desktop Icons\\directory_closed-5.ico,0\n",
'FolderType=Generic']with open(r'C:\Users\Arman\Desktop\TestFolder\desktop.ini', 'w') as f:
f.writelines(desktop_ini)
f.close()os.system('attrib +s +h C:\\Users\\Arman\\Desktop\\TestFolder\\desktop.ini')
os.system('attrib +r C:\\Users\\Arman\\Desktop\\TestFolder')
but it's not working