I am concatenating a number of variables and I want to save that string as a file path.
Is there a way it will automatically create all appropriate directories if th
using System.IO; .... Directory.CreateDirectory(@"c:\temp\a\b\c\d\e");
Use new FileInfo(path).Directory.Create().
new FileInfo(path).Directory.Create()
(This creates anything in the hierarchy that's required. If the directory already exists it does nothing.)