Herkese hayırlı cumalar;
Arkadaşlar c:\wav\ klasörü içerisinde bir çok dosya var. Ben bu klasör içerisindeki örnek olarak 27.11.2011 tarihinde oluşturulmuş dosyaları c:\wav\27112011 klasörü içerisine taşımak istiyorum. Bunu nasıl yapabilirim ? Herkese teşekkürler
Dosya Tarihlerini Okuma
Forum kuralları
Forum kurallarını okuyup, uyunuz!
Forum kurallarını okuyup, uyunuz!
Re: Dosya Tarihlerini Okuma
aşağıdaki fonksiyonlar işini görür.
Kod: Tümünü seç
procedure CopyFiles(const FromFolder: string; const ToFolder: string);
var
Fo : TSHFileOpStruct;
buffer : array[0..4096] of char;
p : pchar;
begin
FillChar(Buffer, sizeof(Buffer), #0);
p := @buffer;
StrECopy(p, PChar(FromFolder)); //this is folder that you want to copy
FillChar(Fo, sizeof(Fo), #0);
Fo.Wnd := Application.Handle;
Fo.wFunc := FO_COPY;
Fo.pFrom := @Buffer;
Fo.pTo := PChar(ToFolder); //this is where the folder will go
Fo.fFlags := 0;
if ((SHFileOperation(Fo) <> 0) or (Fo.fAnyOperationsAborted <> false)) then
ShowMessage('File copy process cancelled')
end;
Kod: Tümünü seç
function GetFileDateTime(FileName: string): TDateTime;
var intFileAge: LongInt;
begin
intFileAge := FileAge(FileName);
if intFileAge = -1 then
Result := 0
else
Result := FileDateToDateTime(intFileAge)
end;
Bir kelimenin anlamını öğretsen bile yeter..


