In a C# 2010 application I need to setup different directory levels in a file structure and place various files like pdf, word, excel, and tiff files in the various folders that are created.The full directory structure will look like the following:
D://totalinventory/department_codes/date formatted like mm-yyyy/quanity-on-hand/customer number.
Can you tell me how to write this code?
Loading
FroglegPosted Oct 28, 2012, 9:09 PM
Sie StePosted Oct 28, 2012, 8:50 PM
FroglegPosted Oct 28, 2012, 4:23 AM
Sie StePosted Oct 28, 2012, 12:15 AM
FroglegPosted Oct 27, 2012, 4:03 PM
string str = DateTime.Now.ToShortDateString();
string _theDate = str.Replace("/","_");
Directory.CreateDirectory(@"D:\totalinventory\department_codes\" + _theDate + @"\quanity_on_hand\customer number");