From: Mark Hahn Date: 2002-01-02T10:29:21+09:00 Subject: [ruby-talk:30005] Re: Execing command with backquotes Try \\\\ instead of \\. -----Original Message----- From: Frank Benoit [mailto:mail02@frankbenoit.de] Sent: Tuesday, January 01, 2002 5:05 PM To: ruby-talk ML; undisclosed-recipients: Subject: [ruby-talk:30002] Re: Execing command with backquotes Meanwhile I tried a lot. Now I think it is something with the backslash: #commandstring = "dir" # Don't work commandstring = "cmd.exe /c dir" # OK #commandstring = "cmd.exe /c dir /w" # OK #commandstring = "cmd.exe /c dir c:\\Temp" # Don't work #commandstring = "cmd.exe /c \"dir c:\\Temp\"" # Don't work puts commandstring # Execute Command print "Execute : >" returnval = `#{commandstring}` puts "<" # Print Command Output puts "Output : >" + returnval + "<"