I am using the following code to write the Date Modified time of a Directory to a label
string selectedPath = comboBox1.SelectedItem.ToString();
DateTime las
In .NET CORE
You will need to get the absolute path of the file.
Add reference to Microsoft.Extensions.Hosting
Inject that into your constructor
The ContentRootPath
property will be your web root.
Grab your server path
var Files = FIO.Directory.GetFiles("Unzipped");
This will be your actual path
var Path = string.Format(@"{0}\{1}",WebRootPath, Files[0]);
var CreationDate = File.GetLastWriteTime(Path);