Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can GUID string be used as a folder name on a windows server

Tags:

.net

guid

I would like to create folders dynamically on a windows web server to store uploaded files from client machines. I am planning to use GUID values, created as part of the asp.net membership module, as the folder names. Since the chracters, / \ * ? < > |, are not allowed in a windows folder name, I am wondering whether any of them will be part of a GUID and hence will cause issues.

Thanks

like image 592
user466663 Avatar asked Oct 27 '25 09:10

user466663


1 Answers

The string serialization used for GUIDs by .NET (as pointed out by the documentation, which you might want to read next time before asking) consists only of hexadecimal numbers and dashes, so yes, you can safely use them as file or directory names.

like image 200
Matti Virkkunen Avatar answered Oct 29 '25 23:10

Matti Virkkunen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!