I am trying to create a new directory using Directory.CreateDirectory()
, but I am unable to understand why it does not create a new directory when I use the following code.
var directory = Path.Combine(Environment.CurrentDirectory, "Status" + "-" + "Test" + Guid.NewGuid() + "\\");
Directory.CreateDirectory(directory);
But when I manually feed the file path it creates the directory (works well).
Directory.CreateDirectory(@"F:\Code\Help\");
Am I doing it wrong?
Any comments or feedback is greatly appreciated. TIA.
"F:\\Code\\Help\\Status-Test-4cb61c98-bf52-42de-bb1e-c827c4a97e01"