I am trying to create a folder with a variable that can change, I am using
System.IO.Directory.CreateDirectory
When I hardcode a value like so:
var folder = @"C:\Users\Laptop\Documents\bot\random string here"
It creates that directory, but when I pass data to my method and try and use it like so:
var folder = @"C:\Users\Laptop\Documents\bot\" +
articlename.Replace(" ", "_");
System.IO.Directory.CreateDirectory(folder);
It doesn't create it nor break. How can I use the variable to create a folder like that?
My article
is a random string like "hello this is a article yadda"