I have compiled a small rename program using py2exe. Whenever I run the executable I receive the following error: "Line 17, in WindowsError: [Error 5] Access is denied". The program runs fine in the python interrupter, but does not work as an EXE. I have tried running the executable with admin rights but I have gotten the same results. Below is line 17, does anyone know why this is occurring? Thanks.
for filename in filenames:
os.rename(os.path.join(path, filename), os.path.join(path, filename.replace(cur_Name, new_Name)))