shutil.copy script not working

Posted by yuvi on Server Fault See other posts from Server Fault or by yuvi
Published on 2012-11-07T02:14:29Z Indexed on 2012/11/07 5:02 UTC
Read the original article Hit count: 431

Filed under:

I wrote a script in python that was supposed to copy a bunch of files to system32 and then install them through cmd.

I can do it manually but I'm trying to make it automatic. This is what I wrote:

Import shutil

Import os

L = ['file1.type', 'file2.type'.... ]

dst = "C:\Windows\system32"

For f in L: shutil.copy(f, dst)

os.system("cmd command yada yada...")

And it doesn't work. I tried doing it step by step with idle and it worked fine. All the files are in the same directory as the script. What am I missing here?

© Server Fault or respective owner

Related posts about python