I have been a long time linux user and now I am really confused by permissions in Windows 10.
I created a python script in linux which works fine and am now trying to get it to work in Windows.
In C:\ProgramData there is a subdirectory into which I can paste files I have copied from a flash drive using File Explorer.
I am the only user on this machine and am administrator.
If I run the python script it seems to work without errors but the file never gets pasted.
Even if i run the script from Command Prompt (Admin) it fails with no error messages.
How does this all work and can I get it to work?
I intend to end up with this as a gui program but am stuck at present
#!c:/Python27/pythonfrom Tkinter import *
from ctypes import windll, byref, wintypes
from ctypes.wintypes import SMALL_RECT
root = Tk()
STDOUT = -12
todir = "c:/ProgramData/SoundBox/Videos"
#Pick a video file and copy it.
if myname =="":
(filepath, filename) = os.path.split(myname)
myfin = filename
doit="copy " + myname + " " + todir
hdl = windll.kernel32.GetStdHandle(STDOUT)
rect = wintypes.SMALL_RECT(0, 50, 50, 30) # (left, top, right, bottom)
windll.kernel32.SetConsoleWindowInfo(hdl, True, byref(rect))