c# - how to get file properties? - Stack Overflow

PHOTO EMBED

Wed Apr 27 2022 19:07:42 GMT+0000 (Coordinated Universal Time)

Saved by @javicinhio #cs

FileInfo oFileInfo = new FileInfo(strFilename);

if (oFileInfo != null || oFileInfo.Length == 0)
{
   MessageBox.Show("My File's Name: \"" + oFileInfo.Name + "\"");
   // For calculating the size of files it holds.
   MessageBox.Show("myFile total Size: " + oFileInfo.Length.ToString());
}
content_copyCOPY

https://stackoverflow.com/questions/7861886/how-to-get-file-properties