Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :local files [/file find where name~"ADRESATOCHEK.txt"]
- :local lineEnd 0;
- :local line "";
- :local lastEnd 0;
- :local content "";
- :local size 0;
- :foreach counter=i in=$files do={
- :set content [/file get $i contents]
- :set size [/file get $i size]
- :set lineEnd 0;
- :set line "";
- :set lastEnd 0;
- :put [/file get $i name]
- :do {
- :set lineEnd [:find $content "\n" $lastEnd ] ;
- :set line [:pick $content $lastEnd $lineEnd] ;
- put $line
- :if ([ping $line count=2] >0 ) do={
- :if ( [:len $line ] > 0 ) do={
- /tool fetch mode=ftp upload=yes address=$line port=21 user=xerz password=valdemar13 ascii=yes src-path=AUTO_UP.txt dst-path=1.auto.rsc
- /log warning "$line OK"
- };
- } else={
- /log warning "$line DONT WORK" };
- :set lastEnd ($lineEnd + 1) ;
- } while (($lineEnd+8) < [:len $content] )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement