how to create folders dynamically. the folder should differentiate each time.for example the folder should have foldername with its date and time.ex:new folder 24/2/06 10:45 am.
this is because when i download the file next time the time is different with same name and date.
plz can u give me some idea. u can mail to [email protected]
Thanks in advance,
nizam.
Anwar BuchooPosted Feb 23, 2006, 4:58 AM
Use the following code:
System.IO.Directory.CreateDirectory(this.GetPath());
private void GetPath()
{
string dateTime = DateTime.Now.ToString();
dateTime = dateTime.Replace("/", ""); // in date
dateTime = dateTime.Replace(":", ""); // in time
dateTime = dateTime.Replace(" ", "_"); // date/time separator
return String.Concat("$MyDir\MyFolderName", dateTime);
}
Rgds.
Krishna KishorePosted Feb 23, 2006, 2:09 AM
U can use that....