forked from Pahiro/AutoIT-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 2
/
SyncFTP.au3
25 lines (22 loc) · 909 Bytes
/
SyncFTP.au3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#Include <FTPEx.au3>
#Include <File.au3>
Dim $Feed
While 1
If InetRead ( "http://bennet-pc:8085/subscriptions?id=pyrohiroshi&format=22&host=localhost&port=8083&size=25&orderby=published&removeDescription=true&removeTitle=false", 1) <> $Feed Then
$server = 'mysite.mweb.co.za'
$username = 'm0195130'
$pass = 'qazwsx3'
$Open = _FTP_Open('MyMweb')
$Conn = _FTP_Connect($Open, $server, $username, $pass)
$Feed = InetRead ( "http://bennet-pc:8085/subscriptions?id=pyrohiroshi&format=22&host=localhost&port=8083&size=25&orderby=published&removeDescription=true&removeTitle=false", 1)
$File = FileOpen ( "feed.xml", 2)
FileWrite ($File, $Feed)
FileClose($File)
$sLocalFile = "feed.xml"
$sRemoteFile = "feed.xml"
$Result = _FTP_FilePut($Conn, $sLocalFile, $sRemoteFile)
ConsoleWrite($Result)
$Ftpc = _FTP_Close($Open)
EndIf
Sleep(1800000) ;Check for new videos every 30 minutes
WEnd