MATLAB Answers

what is the difference between one backslash (\) and double backslashes (\\) when defining a path?

96 views (last 30 days)
Dear All I am trying to understand a code written by an alumni. I found that for defining a data directory which is located on a server (not on the computer) the double backslashes was used in the beginning of the path definition. Something like DIR = '\\zserver\data'. I am wondering why \\ is used. I'd appreciate your comments. Bests MA


Sign in to comment.

Accepted Answer

Mohammad Abouali
Mohammad Abouali on 22 Jan 2015
Edited: Mohammad Abouali on 22 Jan 2015
that's how on windows machine the server is defined.
so that way, the system knows that the name immediately after \\ is referring to the server name.

More Answers (0)

Sign in to answer this question.