When I need to have my code write files to a unique folder, I often use the following trick.
string folderName = someRoot + @"\" + username + @"\" + DateTime.Now.Ticks.ToString();
As long as I'm not writing code which runs multiple threads this will pretty much guarantee me of a unique folder name and it looks nicer than a Guid as a folder name.
dasBlog theme by Mads Kristensen
Concepts LINQ Entity Framework WCF WPF RESTful Web Unit Testing .NET Workflow More >>
Tools Visual Studio Windows IIS Silverlight More >>
Type Screencast Tools Video Newsletter Sample Article Books Magazine How To Demo Course Products More >>