Jump to content

Ftp Den Dosya İndirmek


DjTurkisH
 Share

Recommended Posts

Dosya indirilirken Hız Kalan Zaman gibi şeyleri nasıl Yapabiliriz ??

 

Status.Dlg İle Gösterebilirsin Şu Şekilde;

 

pre_1417341694__adsz.png

 

Şu Konuları Bir İncele:

 

http://www.tnctr.com/topic/258763-soruftp-program-yndirici/

 

http://www.tnctr.com/topic/260204-ftp-download/

FTP.Connect("pack.ttnetbilisim.net", "anonymous", "", "", true) -- ziyaretçi olarak bağlan
FTP.ChangeDir("ttnet/oktaymt2/") -- dosyanın bulunduğu klasöre git
StatusDlg.Show(); -- progressi göster
StatusDlg.ShowCancelButton(true, "İptal");
FTP.Download("packy.rar", "C:\\Downloads\\packy.rar", nil) -- dosyayı indir
StatusDlg.Hide(); -- progressi gizle
FTP.Disconnect(); -- bağlantıyı kapat
Dialog.Message("Bilgi", "Dosyanın İndirilme İşlemi Tamamlandı", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); -- bilgi ver
File.ExploreFolder("C:\\Downloads", SW_SHOWNORMAL); -- indirdiği klasörü aç
Edited by kaan_karabey
Link to comment
Share on other sites

  • Editor

ftp den dosya indirmek için öncelikle.

 

9PpeeeJ.png

 

FTP pluginini seçmelisiniz. Daha sonra.

 

FTP de indirmek içni örnek kod bu zaten ActionWizard danda yaparsınız.

FTPWI.Download("ftp://ftp.myftpsite.com/myfile.txt", "C:\\Downloads\\myfile.txt", "anonymous", "guest@", MODE_BINARY, 20, 21, true, ftpStatus);

Son parametresine dikkat. ftpStatus yazmışım bu bir callback function dır arkaplanda işlem yapar. O fonksiyona istediğiniz değerleri yollar.

 

Fonksiyonuda globalde bu şekilde tanımlarsanız. İstediğiniz değerler parametre olarka eklenmiştir.

function ftpStatus(BytesRead,FileSize,TransferRate,SecondsLeft,SecondsLeftFormat,Message)


end

Gelen değerler ile alakalı bilgiler için burayı okuyun.

 

 

The callback function must be able to receive the following parameters:

BytesRead

(number) The number of bytes that have been downloaded so far.

FileSize

(number) The file size in bytes or 0 if the file size could not be retrieved from the server.

TransferRate

(number) The current transfer rate in Kilobytes per second.

SecondsLeft

(number) The estimated number of seconds left in the download.

SecondsLeftFormat

(string) The estimated number of seconds left formatted as a string in the form of: ""MM:SS".

Message

(string) Either a blank string ("") or an information message being sent by the server, such as "Resolving host name" or "Connecting to Server."

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...