alperen_drms Posted July 20, 2011 Share Posted July 20, 2011 (edited) [font="Tahoma"]Selamlar arkadaşlar, Bir ftp sitesi[/font][font="Tahoma"] kullanıyorum.Buraya autoit le dosya atıyorum.Bu dosyaların ismine tarih-saat grubunuda eklemem lazım.log dosyaları yolluyorum. Kullandığım ftp kodunu vereyim. [codebox]#include <.FTP.au3> #include ;only used for this test file to dispay the return value of the _FTPFileFind* functions $server = 'ftp.phpnet.us' $username = 'SECRET' $pass = 'SECRET' ;Please Note Trailing and Leading slashes (back or forward) for directoryies local and remote for all commands, as they are critical ;$Hand will be a handle in the form of an array containing multiple handles and information, and is the only handle referenced $Hand = _FTPOpen('Doesnt Matter') _FTPConnect($Hand, $server, $username, $pass) if @error then msgbox(0,"Error","bağlantı hatası") _FtpPutFile($Hand,@ScriptDir&'\ss\log.txt', '/htdocs/log.txt') ;Upload to sub directory with different file name if @error then msgbox(0,"Error","PutFile 3") _FTPClose($Hand);Close ftp session[/codebox] Bütün kodlarda bir şey yok.Yardım edeyim.Upload yapan fonksiyon kodu; [code] _FtpPutFile($Hand,@ScriptDir&'\ss\log.txt', '/htdocs/log.txt') ;Upload to sub directory with different file name if @error then msgbox(0,"Error","PutFile 3") [/code] Yani kodu yalınlaştırırsak; [code]_FtpPutFile($Hand,'GÖNDERİLECEK DOSYA', 'FTPye KAYDEDİLECEK YER-İSİM')[/code] Tarih-saat grubu msgbox gibi yerlerde kullanılıyor.Buna da eklemek mümkün mü? Birde bu log dosyalarının 1 saat de bir yollanmasını istiyorum.En üstteki script'e ne eklemeliyim? Şimdiden teşekkürler...[/font] Edited July 20, 2011 by alperen_drms Quote Link to comment Share on other sites More sharing options...
asmazh Posted July 20, 2011 Share Posted July 20, 2011 @alperen_drms _FtpPutFile ($Hand,'GÖNDERİLECEK DOSYA', 'FTPye KAYDEDİLECEK YER- İSİM') saat ve tarih eklemek istediğin yere @MDAY&"\"&@MON&"\"&@YEAR&" - "&@HOUR&":"&@MIN&":"&@SEC bunları yazabirsin Quote Link to comment Share on other sites More sharing options...
alperen_drms Posted July 20, 2011 Author Share Posted July 20, 2011 [quote name='asmazh' date='20 July 2011 - 07:03 ' timestamp='1311145412' post='1048793'] @alperen_drms _FtpPutFile ($Hand,'GÖNDERİLECEK DOSYA', 'FTPye KAYDEDİLECEK YER- İSİM') saat ve tarih eklemek istediğin yere @MDAY&"\"&@MON&"\"&@YEAR&" - "&@HOUR&":"&@MIN&":"&@SEC bunları yazabirsin [/quote] saol arkadaşım. onu hallettim. şimdi 1 saatte 1 nasıl log dosyasını alcam? Quote Link to comment Share on other sites More sharing options...
asmazh Posted July 20, 2011 Share Posted July 20, 2011 (edited) Sleep(100000) ile alabilirsin ama bu programın başka bir işlem yapmasına izin vermez. yada böyle bir yöntem dene: $Hour_h = @HOUR Local $Hour = @HOUR + 1 While 1 If $Hour_h = $Hour Then ; Yapılacak işlem EndIf WEnd Kodları yanlış vermiştim düzelttim biraz kurcala yaparsın. Edited July 20, 2011 by asmazh Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.