Use python to modify file (workaround for WindowsError 5 Access is denied) -
i trying augment c:\program files\%x%\%text_file%.txt
.
i admin on pc , granted full access users on text file (overkill, local pc).
i trying use the solution documented here, yet still getting windowserror: [error 5] access denied
.
my goal have script systematically can go in , modify text file. current python code matches in link above directly.
thank guidance!!
without sample code demonstrate usage, can presume using "c:\program files\%x%\%text_file%.txt" directly , there no valid environment variables "x" , "text_file" replace with.
on windows, value wrapped in % expanded , replaced environment variable. example echo %temp%
@ command prompt (cmd.exe) expand out temp
environment variable , print out c:\program files\temp
i hope helps
Comments
Post a Comment