Webserver folder

you can create a folder and sub folders on the web server to save files.
I used:

myServer = system.net.getHostName()
print myServer

netAuth = "net use /user:Name\\"+myServer+"\myfolder password"
os.makedirs( netAuth + '\newfolder', 0755)

but it does not work!

Do you have any suggestions?

What context are you attempting to do this? getHostName() returns the host of the context you are running in.

There is no reason to use network shares, just write directly to the drive.

Also, did you intentionally use the unchanged netAuth string in your makedirs? Because netAuth still contains a command, “net use /user:Name”, at the beginning of it, whereas I’m pretty sure you only want to pass the destination path into makedirs.

ETA: also, you should escape your backslashes.

netAuth = "net use /user:Name\\"+myServer+"\myfolder password"

should be

netAuth = "net use /user:Name\\\\"+myServer+"\\myfolder password"

Thanks zacslade, that works.