Trying to create program that adds folders into program files-recieving this error:
WindowsError: [Error 5] Access is denied 'C:\Program Files\IMP'
Here is my code
import os, sys, random
numb= 1
x=True
while x==True:
newpath = ((r'C:Program FilesIMPfolder_%s') % (numb))
if not os.path.exists(newpath):
os.makedirs(newpath)
numb=numb+1
if numb==11:
x=False
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…