From: Tobias Reif Date: 2003-09-03T18:29:10+09:00 Subject: Re: how to get the output of commands which contain backslashes? Hi > | How to escape a backslash in order to pass a single backslash to the > | shell? > | > | I appreciate any solution, even dirty hacks and quirky workarounds > | :) > > Solution A: First of all: Thanks for replying! > cmd = '\for-programs\use\tidy\tidy.exe -v' > `command.com /c #{cmd}` Tried that already (see "def shell command" in the original post), doesn't work on Windows ME. ########## nakamura ########## #Solution A: cmd = '\for-programs\use\tidy\tidy.exe -v' puts `command.com /c #{cmd}` #Solution B: puts `command.com /c \for-programs\use\\tidy\\tidy.exe -v` ############################## C:\del>ruby nakamura C:\del> No output. > Solution B: > `command.com /c \for-programs\use\\tidy\\tidy.exe -v` I wrote: # these don't work (nothing printed) puts `command.com /c \for-programs\use\tidy\tidy.exe -v` puts `command.com /c \\for-programs\\use\\tidy\\tidy.exe -v` Does your code work for you, on a Win9* (Windows ME) box? This really is a thorny problem ... I tried a lot already. I need code which actually works on Win9* boxen. Tobi -- http://www.pinkjuice.com/