Arsip: copy file dengan parameter date modified

 
user image
more 17 years ago

jagur

Bro... tulung dong gmn copy paste file tertentu ke folder tertentu dengan filter date modified file tadi tks b4 :?:
user image
more 17 years ago

ZeAL

kalo copy biasa, pake fungsi CopyFile.. di search aja.. dah sering di bahas.. Kalo ngerubah file date, kalo gak salah pake fungsi FileAttrib.. eh..err.. apa yah untuk ngerubah tanggal... Coba yang diinstal Delphi di kompi nya, teken F1.. hehehe..
user image
more 17 years ago

mas_kofa

dari post @zeal........... 1. file kita cek file date dgn fungsi FileAttrib...... 2. jika date sesuai yg diinginkan maka copy file tersebutCopyFile.........
user image
more 17 years ago

Yudho

WAH. Apaan lagi Itu FileAttrib ... gak mudeng blas aku. Kalau boleh tahu, minta penjelasanya dong? hehehehee Trim's
user image
more 17 years ago

jagur

nih bro yudho ... scodenya buat find file procedure TfrMain.FileSearch(const PathName, FileName : string; const InDir : boolean; FileDate: TDateTime); var Rec : TSearchRec; Path : string; begin Path := IncludeTrailingBackslash(PathName); if FindFirst(Path + FileName, faAnyFile - faDirectory, Rec) = 0 then try repeat // tambahin filter Tanggal if (FileDateToDateTime(Rec.Time) < FileDate) then lbFile.Items.Add(Path + Rec.Name); until FindNext(Rec) <> 0; finally FindClose(Rec); end; If not InDir then Exit; if FindFirst(Path + '. ', faDirectory, Rec) = 0 then try repeat // tambahin filter Tanggal if ((Rec.Attr and faDirectory) <> 0) and (Rec.Name<>'.') and (Rec.Name<>'..') and (FileDateToDateTime(Rec.Time) < FileDate) then FileSearch(Path + Rec.Name, FileName, True,FileDate); until FindNext(Rec) <> 0; finally FindClose(Rec); end; end; //procedure FileSearch
user image
more 15 years ago

sidiq_himura

tolong dong gimana kalaw saya maw simpen file'a lewat network jadi filenya saya simpen ke server, saya sudah coba langsung di tujukan ke ip adress'a tapi belum berhasil mohon pencerahannya
user image
more 15 years ago

DelphiExpert

thread lama mengambang lagi :mrgreen: @sidiq_himura: 1. gunakan standard fungsi copy ke network address, artinya harus ada folder yg di share dng write privilege 2. buat program kecil2an sebagai FTP listener (FTP server), taruh ditarget komputer. upload/download via FTP protokol, atau kalau mau, bisa bikin protokol sendiri berbasis TCP/(UDP?)
user image
more 15 years ago

alvonz

saya dapet contoh source copyfile dari tips n trik kali aja bermanfaat: function TInstallForm.CopyFileUsingBuffer(srcFName, destFName: String): Boolean; type {define a buffer as a character array type of length maxBufferSize...} TMyBufferArray = array of char; {and define a pointer type to point into the buffer...} TMyBuffer = ^TMyBufferArray; var buffer: TMyBuffer; srcFile, destFile: File; bytesRead, bytesWritten, i: LongInt; readOrWriteError: Boolean; begin bytesRead := 0; try {to allocate memory for the buffer...} getmem(buffer, maxBufferSize); AssignFile(srcFile, srcFName); AssignFile(destFile, destFName); try {to open both source and destination files...} reSet(srcFile, 1); reWrite(destFile, 1); try repeat {put source file data into into the buffer and write buffer to destination file...} blockRead(srcFile, buffer^, sizeof(buffer^), bytesRead); blockWrite(destFile, buffer^, bytesRead, bytesWritten); until ((bytesRead < maxBufferSize) or (bytesRead = 0) or (bytesWritten <> bytesRead)); finally closefile(srcFile); closeFile(destFile); end; {putting source file data into memory} except on E: EInOutError do begin {you COULD call some kind of GetError routine here to retrieve the exact error code if you wanted to...} readOrWriteError := True; end end; {trying to open source file} finally freemem(buffer, maxBufferSize); end; if (readOrWriteError = True) then Result := True; if (readOrWriteError = False) then Result := False; end;
more ...
  • Pages:
  • 1
Share to

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com