0

Is possible to use windows network path with python functions?

ex. //SERVERNAME/SharedFolder

For example something like os.makedirs('////SERVERNAME//SharedFolder//NewFolder')

It seems it doesn't work for me

Thanks, Federico

1 Answer 1

1

Try using raw string.

Ex:

os.makedirs(r'\\SERVERNAME\SharedFolder\NewFolder')
Sign up to request clarification or add additional context in comments.

2 Comments

I tried but i get: [Errno 20047] Unknown error: 20047: '\\\\'
Strange the above line works fine for me. Do you have r in front of you path?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.