Jump to content

Oluşturduğum Dosya Ismine Saat-Zaman Eklemek


alperen_drms
 Share

Recommended Posts

[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 by alperen_drms
Link to comment
Share on other sites

[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?

Link to comment
Share on other sites

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 by asmazh
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...