cause if c:\dimas password\ exist but is empty, then it returns "" as well, so going to MkDir would crash it.

It also returns "" is the folder contains hidden files.

Use the method mentioned above.