------art_12753_30653921.1201911300446
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Yeah

Windows/DOS has accepted either / or \ as directory separators for a while:
http://en.wikipedia.org/wiki/Path_(computing)#Representations_of_paths_by_operating_system

However as you said dir is an internal command and forward slash breaks with
it on the windows command line, but it does work in irb and stand-alone
ruby.


irb(main):001:0> system('dir "d:/program files"')
 Volume in drive D is WINDOWS
 Volume Serial Number is 847A-A69A

 Directory of d:\program files

13/01/2008  05:21 PM    <DIR>          .
13/01/2008  05:21 PM    <DIR>          ..
13/01/2008  05:30 PM    <DIR>          Cakewalk
24/10/2007  12:04 AM    <DIR>          Common Files
24/10/2007  12:03 AM    <DIR>          ComPlus Applications
10/11/2007  11:11 PM    <DIR>          DAEMON Tools
03/01/2008  05:12 PM    <DIR>          DIFX
24/10/2007  12:48 AM    <DIR>          Internet Explorer
04/01/2008  09:28 AM    <DIR>          Java
24/10/2007  12:19 AM    <DIR>          Messenger
24/10/2007  12:36 AM    <DIR>          MSBuild
24/10/2007  12:40 AM    <DIR>          MSXML 6.0
24/10/2007  12:31 AM    <DIR>          Reference Assemblies
12/12/2007  09:03 PM    <DIR>          TortoiseSVN
02/11/2007  04:09 PM    <DIR>          vim71
24/10/2007  12:03 AM    <DIR>          Windows NT
               0 File(s)              0 bytes
              18 Dir(s)   5,931,704,320 bytes free
true





On Feb 1, 2008 6:48 PM, Nobuyoshi Nakada <nobu / ruby-lang.org> wrote:

> Hi,
>
> At Fri, 1 Feb 2008 13:06:56 +0900,
> Dan wrote in [ruby-talk:289420]:
> > you could use
> >
> > system('dir "e:/program files"')
>
> dir is an internal command, and you can't use forward slashes
> as director separators.
>
> --
> Nobu Nakada
>
>

------art_12753_30653921.1201911300446--