Go Back   FlashFXP Forums > >

Programming Need help with C/C++/Delphi? Ask here and make us all laugh.

Closed Thread
 
Thread Tools Rate Thread Display Modes
Old 01-21-2004, 07:12 AM   #1
b>d>>s
Senior Member
 
Join Date: Feb 2003
Posts: 488
Default [iTCL] could u make ascii2bin accept lists

?

atm, it just accepts lines separated by \n


just a thought ..
b>d>>s is offline  
Old 05-07-2004, 04:56 PM   #2
Ofloo
Member
 
Join Date: Jun 2003
Posts: 43
Default

set filename "your file to convert"

set rfile [open $filename r]
fconfigure $rfile -translation crlf
set rdata [read $rfile]
close $rfile
set wfile [open $filename w]
fconfigure $wfile -translation crlf
puts $wfile "$rdata"
close $wfile


that should take care of it i think ..
Ofloo is offline  
Old 05-07-2004, 05:17 PM   #3
neoxed
Too much time...
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: May 2003
Posts: 1,326
Default

No, he was talking about the userfile and groupfile function, not reading from files.

[userfile ascii2bin ...] and [groupfile ascii2bin ...]

http://www.ioftpd.com/board/showthre...&threadid=1775

Could easily be done by:

userfile open "someuser"
userfile lock
set newufile ""
lappend newufile "credits 0 0 0 0 0 0 0 0 0 0"
lappend newufile "tagline Unknown"
userfile ascii2bin [join $newufile "\n"]
userfile unlock

ioFTPD would then replace the 'credits' and 'tagline' portion of the userfile with the new values, leaving the rest as it previously was.
neoxed is offline  
Closed Thread

Tags
accepts, lines, make, separated, thought

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 On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:29 AM.

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