From: Mark M. <mie...@gm...> - 2007-05-15 13:03:47
|
On 5/15/07, Michael Lueck <ml...@lu...> wrote: > > > I assume you still return as the fifth word (in most cases) the filename > as it exists on disk rather than an all UPPER/lower version. > > Also, I assume (as result of above) that if to files exist in a directory > with only CaSe differences, that this poses no problems either. Yes to both questions. What is returned is what is on disk. If files have the same name, but just differ in the case, they are all returned. #!/usr/bin/rexx /* Simple test of case insensitive SysFileTest() */ say "File spec: testDir/*.txt Case insensitive, recursive" say "Current directory:" directory() ret = SysFileTree("./*read*", files, "BSIO"); if ret <> 0 then do say "SysFileTree error:" ret exit 1 end if files.0 == 0 then do say "No matches for ./*read*" exit 0 end do i = 1 to files.0 say "File:" files.i end Produces: File spec: testDir/*.txt Case insensitive, recursive Current directory: /work.ooRexx/wc File: /work.ooRexx/wc/testDir/windows-build.txt File: /work.ooRexx/wc/testDir/unix-like-build.TXT File: /work.ooRexx/wc/testDir/my.TXT File: /work.ooRexx/wc/testDir/this.txT File: /work.ooRexx/wc/testDir/unix-like-build.Txt File: /work.ooRexx/wc/testDir/unix-like-build.TxT File: /work.ooRexx/wc/testDir/unix-like-build.txt ... -- Mark Miesfeld |