Advertisement
Guest User

Untitled

a guest
Nov 8th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. :local files [/file find where name~"ADRESATOCHEK.txt"]
  2. :local lineEnd 0;
  3. :local line "";
  4. :local lastEnd 0;
  5. :local content "";
  6. :local size 0;
  7. :foreach counter=i in=$files do={
  8. :set content [/file get $i contents]
  9. :set size [/file get $i size]
  10. :set lineEnd 0;
  11. :set line "";
  12. :set lastEnd 0;
  13. :put [/file get $i name]
  14.  
  15. :do {
  16. :set lineEnd [:find $content "\n" $lastEnd ] ;
  17. :set line [:pick $content $lastEnd $lineEnd] ;
  18. put $line
  19. :if ([ping $line count=2] >0 ) do={
  20. :if ( [:len $line ] > 0 ) do={
  21. /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
  22. /log warning "$line OK"
  23. };
  24. } else={
  25. /log warning "$line DONT WORK" };
  26. :set lastEnd ($lineEnd + 1) ;
  27. } while (($lineEnd+8) < [:len $content] )
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement