Re: [Rails] Re: Opening a file having white spaces on is name with the default program

2012-06-14 Thread Colin Law
On 13 June 2012 09:05, Paulo Carvalho wrote: > Hello, Please don't top post, it makes it difficult to follow the thread. Insert your reply inline in previous post. Thanks > > Thanks for your answer. > > I have made a put of the command > > f1 = "d:/sat - Copy.png" > f1 = f1.gsub(" ", "\ ") > cm

[Rails] Re: Opening a file having white spaces on is name with the default program

2012-06-13 Thread Paulo Carvalho
Hello, Thanks for your answer. I have made a put of the command f1 = "d:/sat - Copy.png" f1 = f1.gsub(" ", "\ ") cmd = 'cmd /c "start ' + f1 + '"' puts "CMD: " + cmd system (cmd) and the result is the following one: cmd /c "start d:/sat - Copy.png" In attachment, I've putted a picture wit

[Rails] Re: Opening a file having white spaces on is name with the default program

2012-06-12 Thread Paulo Carvalho
Hello, Thanks for your answer. However, still not working... f1 = "d:/Copy of t.txt" f1 = f1.gsub(" ", "\\ ") #system %{cmd /c "start #{f1}"} #cmd = 'cmd /c "start ' + f1 + '"' #cmd = 'cmd /c """start ' + f1 + '"""' #cmd = "cmd /c ""start '" + f1 + "'""" cmd = "cmd /c ""start '" + f1 + "'""" sy