There was a problem with shutil in jython see http://bugs.jython.org/issue1872
However this should not be your problem?
You got a forward slash in your path (/) this can't be good. In order to make your program work do the following.
folderPath = 'C:\Program Files (x86)\Program\folder/' + folderName
if not os.path.exists(folderPath):
try:
shutil.copytree('C:\Program Files (x86)\Program\folder\anotherfolder', folderPath)
except Exception, exc:
print exc
This will catch the error which is raised. If it happens again you should be able to get more detailed information about the error.
You could also use:
folderPath = 'C:\Program Files (x86)\Program\folder/' + folderName
if not os.path.exists(folderPath):
try:
shutil.copytree('C:\Program Files (x86)\Program\folder\anotherfolder', folderPath)
except Exception:
import traceback
traceback.print_exc()
Edit: Be aware of the fact that your problem still exists! The Exception/Error is caught within the except clause, so the program does not crash. See comments and Laur Ivan's answer. This error happens because you don't have the access rights to do something in the Program Files directory.
I hope this helps. Greetings Xeun