egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

lftp & get "this" file

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
hazzlah
Voice


Joined: 13 May 2011
Posts: 4

PostPosted: Sun Oct 14, 2012 5:12 am    Post subject: lftp & get "this" file Reply with quote

Hey Folks ,
i need some help hope everybody understood what i will then my english its really bad Razz

So i will that my eggdrop download a File whats alltime ends with *.txt.

The Dir change everytim when a new *.txt came. But this all works fine , my Problem its , in this dir a some diffrent files , some times he download the right file but sometimes he downloaded the wrong file and thats really
bad :-/

So here its the Code witch i use maybe its there a better option for string match or somethink other.

set get_filename [exec lftp -c open $ip -u $user,$password -p $port -e "cd $txtdir; ls -m1; mget -O $tmp *.txt;"]

foreach filename [split $get_filename "\n"] {

if {[string match -nocase {*.txt} $filename]} {

So hope anybody out there can help me thats he only download the files witch end with .txt and no other.

Thx
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber