Mega Code Archive

 
Categories / Delphi / Files
 

Seçilen dosyanın tarih bilgileri

//Formunuza bir buton bir opendialog birde label ekleyin... //...::::::( KORSAN )::::::...\\ function GetFileDateTime(const FileName: TFileName): TDateTime; var FStruct: TOFSTRUCT; wndFile: Integer; begin wndFile := OpenFile(PChar(FileName), FStruct, OF_SHARE_DENY_NONE); Result := FileDateToDateTime(FileGetDate(wndFile)); CloseHandle(wndFile); end; procedure TForm1.Button1Click(Sender: TObject); begin if Opendialog1.Execute then label1.Caption := DateTimeToStr(GetFileDateTime(Opendialog1.FileName)); end;