I can not create new folders and copy files by using the following commands:
–os.execute (“MD c:\qqq”))
–os.execute (“move C:\Users\Administrator\Desktop\ts.so c:\qqq”)
What permissions do need to set up?
Or I can open the folder qqq in Win32 and display the files in the folder to the user. My program is a picture downloader, download pictures from my server, download and open the folder for users to copy the mobile and downloaded pictures.
first you’ll need to escape your slashes, fe “md c:\qqq”
THEN you can see if you might also have permission issues
(THEN rewrite it with lfs because it’s more robust than os for such work)
I think you’d be better off using the SSK2–> files.* lib:
This attempt:
os.execute ("MD c:\qqq")) os.execute ("move C:\Users\Administrator\Desktop\ts.so c:\qqq\")
Becomes this success (works equally well on Windows and OS X, except for your C:\ drive. That would be different) :
local folder = ssk.files.desktop.getDrivePath("c:/qqq") ssk.files.util.mkdir( folder ) local src = ssk.files.desktop.getDesktopPath("ts.so") local dst = folder .. "/ts.so" ssk.files.util.mvFile( src, dst )
first you’ll need to escape your slashes, fe “md c:\qqq”
THEN you can see if you might also have permission issues
(THEN rewrite it with lfs because it’s more robust than os for such work)
I think you’d be better off using the SSK2–> files.* lib:
This attempt:
os.execute ("MD c:\qqq")) os.execute ("move C:\Users\Administrator\Desktop\ts.so c:\qqq\")
Becomes this success (works equally well on Windows and OS X, except for your C:\ drive. That would be different) :
local folder = ssk.files.desktop.getDrivePath("c:/qqq") ssk.files.util.mkdir( folder ) local src = ssk.files.desktop.getDesktopPath("ts.so") local dst = folder .. "/ts.so" ssk.files.util.mvFile( src, dst )