Re: newbe q.: How to read windows path names from a file ?



Damian wrote:
hi group!

I'm trying to [get $channel line] from a file containing lines with
something like "c:\Program files\file.ext". after successful reading
$line variable obviously contains "c:Program filesfile.ext". I'd like
to have "c:/Program files/file.ext" instead (maybe after a string
replacement). How to use "gets" to read a line and to read it without
treating "\" character as a special character or with on-the-fly
conversion to "/" character?

NO NO NO ... gets does no such thing!

gets $channel line
set converted [ file normalize $line ]

Should convert the file to have "/" characters


Paul
.



Relevant Pages

  • Re: newbe q.: How to read windows path names from a file ?
    ... Damian wrote: ... I'm trying to [get $channel line] from a file containing lines with ... after successful reading ... Bryan Oakley ...
    (comp.lang.tcl)
  • Re: ATWT/ Meg and Josh
    ... >Anthony D. Langford wrote: ... >> the channel when she's on. ... >> the character at the start. ... >> snare Dusty is definately not endearing. ...
    (rec.arts.tv.soaps.cbs)
  • Re: how to gets with an arbitrary "newline" character
    ... # an I/O channel that ends in an arbitrary character? ... # within each record (and use string map to translate). ... proc getn {channel args} { ...
    (comp.lang.tcl)
  • Re: how to gets with an arbitrary "newline" character
    ... character (from a pipe) in a protocol to delimt records. ... channel to clear the -eofchar temporarily and the char instead. ...
    (comp.lang.tcl)
  • Re: LotRO - ping Turos
    ... Michael Cecil wrote: ... 99.9% OOC and not filterable with the OOC channel, ... You really need a fellowship/kinship/tell channel, ... character should happen to the character. ...
    (comp.sys.ibm.pc.games.rpg)