From: "Morris, Chris" Date: 2002-05-24T22:40:24+09:00 Subject: RE: OS independent scripts, system calls on Windows and Linux > All these incompatibility issues are why I want to talk about an RCR. Seems maybe this is just a bug report: On mswin32 1.6.6, the system call does not work with shell commands. Here's the evidence. cl/util/win is a unit of mine that contains the methods listed in http://ruby-talk.com/10006. Without it, system call does not work on 'dir', but the backticks work. Requiring it fixes the system call for 'dir'. For non cmd.exe calls, system and `` work fine as-is. C:\temp\rcr>copy con test.bat echo Howdy ^Z 1 file(s) copied. C:\temp\rcr>irb irb(main):006:0> VERSION "1.6.6" irb(main):007:0> RUBY_PLATFORM "i586-mswin32" irb(main):001:0> `test.bat` "\nC:\\temp\\rcr>echo Howdy \nHowdy\n" irb(main):002:0> `dir` " Volume in drive C is MS-DOS_6\n Volume Serial Number is BCBF-0F2A\n\n Director y of C:\\temp\\rcr\n\n05/24/2002 08:36a .\n05/24/2002 08:3 6a ..\n05/24/2002 08:36a 12 test.bat\n 1 File(s) 12 bytes\n 2 Dir(s) 123,353,0 88 bytes free\n" irb(main):003:0> system('dir') false irb(main):004:0> system('test.bat') C:\temp\rcr>echo Howdy Howdy true irb(main):008:0> require 'cl/util/win' true irb(main):009:0> system('dir') Volume in drive C is MS-DOS_6 Volume Serial Number is BCBF-0F2A Directory of C:\temp\rcr 05/24/2002 08:36a . 05/24/2002 08:36a .. 05/24/2002 08:36a 12 test.bat 1 File(s) 12 bytes 2 Dir(s) 123,353,088 bytes free 0 Chris