Notifications
Clear all

[Closed] GetDirectories bug?How to fix?

Hi everyone,
I was trying to get directories from a folder,in normal,the getDirectories works fine,when the name of directories names like this {0edd147e-7449-6e80-55f3-63257fcf0266},then will return nothing with getDirectories,please help me if anyone knows how to fix it? (3ds max 2014 or higher) Thanks!

C:\bug
|
–{0edd147e-7449-6e80-55f3-63257fcf0266} (C:\bug\ {0edd147e-7449-6e80-55f3-63257fcf0266})
|
–{2ba58d27-93c8-21fb-5a4e-e9446d13590c} (C:\bug\ {2ba58d27-93c8-21fb-5a4e-e9446d13590c})

bug

print (getDirectories (@"C:\bug"+"\\*.*"))

3 Replies

if you really need , use dotnet , but you should not do anything with folders like this , they are operated by OS

p = @"C:\bug"
(dotnetclass "System.IO.Directory").GetDirectories p

OK,thanks for help

it is not a bug. it doesn’t match because you have a dot in your matching pattern and there is no dot in a GUID.
I suspect you are confusing typical usage of getFiles vs getDirectories
\\*.* becomes \\*