Go Back   FlashFXP Forums > > > >

! Other Scripts Support Support for all other scripts...

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-10-2005, 10:51 AM   #1
CP-Geek
Junior Member
 
Join Date: Oct 2004
Posts: 12
Default iTCL argument question (filename, not path)

Regarding THIS discussion, I'm using a .itcl script:
Code:
##!

catch {putlog "UPDATE: \"$pwd\" \"\002$user\002 uploaded \002 [lindex $args 2] \002\""}

##end
and it works, the line it returns to irc is
Code:
<@FTP-Bot> Geek uploaded  /Uploadz/Misc/Test/test.exe
(How can I add "@ 123 KB/s" in the end of that?)

BUT, I'd like to remove the path, so the result would be only
Code:
<@FTP-Bot> Geek uploaded  test.exe
But how? I'm so newbie in TCL so it's unbelievable

Any ideas?

CP
CP-Geek is offline   Reply With Quote
Old 02-10-2005, 05:13 PM   #2
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

Code:
catch {putlog "UPDATE: \"$pwd\" \"\002$user\002 uploaded \002 [lindex [split [lindex $args 2] "/"] end] @ $speed\002\""}
jeza is offline   Reply With Quote
Old 02-10-2005, 05:24 PM   #3
CP-Geek
Junior Member
 
Join Date: Oct 2004
Posts: 12
Default

Thankz jeza!

Only prob is that now I have to cut the decimals from the speed-display:
Code:
 Geek uploaded  test.exe @ 189.151197475
Gotta do some reading again
CP-Geek is offline   Reply With Quote
Old 02-10-2005, 05:26 PM   #4
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

Code:
catch {putlog "UPDATE: \"$pwd\" \"\002$user\002 uploaded \002 [lindex [split [lindex $args 2] "/"] end]\002 @ \002[format %.0f $speed]\002\""}

[format %.2f $speed] = 2 decimals
jeza is offline   Reply With Quote
Old 02-10-2005, 05:34 PM   #5
CP-Geek
Junior Member
 
Join Date: Oct 2004
Posts: 12
Default

wow, Your fast. Mu most humble thanks! Works very nicely indeed.

CP
CP-Geek is offline   Reply With Quote
Reply

Tags
002, geek, path, question, uploaded

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:52 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)