“Manage Open Files” file path backslash query

In the Manage Open Files feature of windows servers, sometimes files have their root followed by two backslashes instead of one.

So one set would be D:\... and another D:\\...

I was just wondering if anyone knows the significance of this?

One backslashOne backslash
Much appreciated!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joe Winograd, Fellow&MVEDeveloperCommented:
I can understand why they would all be double backslashes, but not some with one and others with two. Both of your screenshots here show all doubles, but I suspect you meant to post this:

The backslash acts an escape character in a string, so to get a single backslash, you need to enter two. For example, in your post at the other site, D:\ turned into just D:, and D:\\ turned into just D:\. But I don't know why Manage Open Files sometimes shows one and other times two. Regards, Joe
the reason why some programs show two backslashes (or even more) where one is sufficient is because windows tolerates this. therefore it is possible when building path strings to forego the check whether a given directory path already was ended by a backslash and simply add a backslash plus subfolder or file (name). moreover, for the root folder of a drive with drive letter like D:\ we have the fact that 'D:' and 'D:\' are different paths in general. only the second one is the root folder while the first one is the "current" folder at the drive. because of that root folders always must have a backslash while paths to other folders normally were expressed without backslash. i prefer to using a forward slash instead of backslash and always have path to folders ended with a slash. with that i don't need escape the separators in strings. however that only works reliably for a programmatic access and may give problems in scripts or as input for other programs or tools.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
leo135Author Commented:
Thanks for the replies everyone. Yes, I think I will probably be sticking with Experts Exchange as opposed to "the other site" as clearly we get good answers here (see above - you even found the picture I forgot to post!)

Thanks a lot
Joe Winograd, Fellow&MVEDeveloperCommented:
You're welcome, Leo. Happy to help — and very glad to have you in the EE community. Regards, Joe
thanks Leo. have a good time.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.