Get file length : FileInfo « File Directory « Visual C++ .NET






Get file length

 

#include "stdafx.h"
using namespace System;
using namespace System::IO;
using namespace System::Text;

int main(array<System::String ^> ^args)
{

    FileInfo ^fileinfo = gcnew FileInfo("c:\\a.txt");


    Console::WriteLine("Length:     {0}", fileinfo->Length);
}

   
  








Related examples in the same category

1.Does a file exist
2.Get the full name of a file
3.Get file creation time
4.Get file last access time
5.Get file last write time
6.Get file attributes