From: "J.Hawkesworth" Date: 2002-10-30T19:47:52+09:00 Subject: How do I get a '\'? Hi, I have one of those USB memory stick things and I've written a little ruby script to back up the contents of the memory stick to my hard disk. However it is ugly and relies on nasty dos commands like xcopy. I'm trying to write a new version that recurses through the directories on the memory stick but I can't find a way to get ruby to produce a single '\' character (which I need for specifiying subdirectories). irb(main):041:0> p "\\" "\\" nil irb(main):042:0> p 92.chr "\\" nil but irb(main):043:0> p 91.chr "[" nil irb(main):044:0> p 93.chr "]" nil interestingly I also get: irb(main):045:0> p File::Separator "/" nil I've tried the same code snippets in a script and get the same results. I'm using ruby 1.66 Pragmatic Programmers version on Windows 2000. Any bright ideas/wisdom gratefully appreciated. All the best, Jon _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre. For further information visit http://www.star.net.uk/stats.asp _____________________________________________________________________ Any views or personal opinions expressed within this email may not be those of Talis Information Ltd. The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited.