From: Luis Lavena Date: 2012-06-17T08:49:56+09:00 Subject: Re: simple IO question; full path not working Kaye Ng wrote in post #1064561: > Hi guys. I'm running windows seven. > > text2.txt is located in O:\Ruby > > The program io.rb is located in O:\Ruby\Practice > > io.rb contains the following code: > > f = File.new("O:\Ruby\text2.txt", "r") > > [...] > > I fail to see anything wrong with the code. Can anyone help please? > > When using double quotes with strings, use double backslashes, which follows the way C strings work (characters after a single backslash are escaped) It is best to use normal slashes (forward slashes): f = File.new("O:/Ruby/text2.txt", "r") -- Luis Lavena -- Posted via http://www.ruby-forum.com/.