Refer -
Directory.CreateDirectory Method (String)[
^]
Quote:
Creates all directories and subdirectories in the specified path.
So, when you write the following code...
Directory.CreateDirectory(Server.MapPath(DateTimeStamp));
It creates a
Directory
Name as
DateTimeStamp
.
Simply it means that it will create a folder name as the value contained in
DateTimeStamp
inside Website Root folder. It can't create the file for you.