<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16455"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT
size=2>(directory-exists? "C:\\Windows\\System32")<SPAN
class=244530223-06122012> -> #t</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=244530223-06122012>(file-exists? "C:\\Windows\\System32") ->
#f</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=244530223-06122012></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=244530223-06122012><FONT color=#000000 size=3 face="Times New Roman">You
wrote: "(Yes, </FONT>Windows 8, please don't laugh at me. :-)
)"</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=244530223-06122012>I am laughing to myself, for I use windows 7 and
windows XP :)</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=244530223-06122012></SPAN></FONT></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=244530223-06122012>Jos</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2
face=Arial></FONT> </DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> users-bounces@racket-lang.org
[mailto:users-bounces@racket-lang.org] <B>On Behalf Of </B>Tim
Nelson<BR><B>Sent:</B> jueves, 06 de diciembre de 2012 23:13<BR><B>To:</B>
users@racket-lang.org<BR><B>Subject:</B> [racket] Behavior of file-exists? and
directory-list<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>
<DIV>Dear Benevolent Racketeers,</DIV>
<DIV><BR></DIV>
<DIV>I just installed DrRacket 5.3.1 on my Windows 8 Laptop. (Yes,</DIV>
<DIV>Windows 8, please don't laugh at me. :-) ) I have not checked</DIV>
<DIV>this on other operating systems or other versions of Racket.</DIV>
<DIV><BR></DIV>
<DIV>One of my Racket projects scans the PATH directories to locate</DIV>
<DIV>the Java executable, if one is installed. I have the</DIV>
<DIV>executable "java.exe" present in the C:\Windows\System32 folder,</DIV>
<DIV>yet:</DIV>
<DIV><BR></DIV>
<DIV>> (file-exists? "C:\\Windows\\System32")</DIV>
<DIV>#f</DIV>
<DIV><BR></DIV>
<DIV>To check myself, I invoked and manually scanned</DIV>
<DIV>down (directory-list "C:\\Windows\\System32"), expecting to see</DIV>
<DIV>#<path:java.exe> but did not.</DIV>
<DIV><BR></DIV>
<DIV>Moreover, counting hidden files and subfolders, I had 3576 files</DIV>
<DIV>in that folder (confirmed via command prompt, not recursive). If</DIV>
<DIV>I don't include hidden files, I have 3238. But:</DIV>
<DIV><BR></DIV>
<DIV>> (length (directory-list "C:\\Windows\\System32"))</DIV>
<DIV>2739</DIV>
<DIV><BR></DIV>
<DIV>So it appears that (directory-list) is missing several hundred</DIV>
<DIV>files that actually exist, including java.exe. java.exe is not</DIV>
<DIV>hidden, not read-only, and it's not obviously a link. (And </DIV>
<DIV>even if it was, shouldn't file-exists? and directory-list </DIV>
<DIV>include it?)</DIV>
<DIV><BR></DIV>
<DIV>On my Windows 7 PC at home, directory-list finds java.exe, but
still </DIV>
<DIV>lists a hundred plus fewer files than appear via DIR:</DIV>
<DIV><BR></DIV>
<DIV>
<DIV>> (length (directory-list "C:\\Windows\\System32"))</DIV>
<DIV>2389</DIV></DIV>
<DIV><BR></DIV>
<DIV>C:\Windows\System32>DIR</DIV>
<DIV>2720 File(s) ... </DIV>
<DIV>91 Dir(s) ...</DIV>
<DIV><BR></DIV>
<DIV>I'm stumped. I even tried to track directory-list to its source,</DIV>
<DIV>but lost the scent in pre-base.rkt.</DIV>
<DIV><BR></DIV>
<DIV>What am I missing here? Is this a potential problem with these</DIV>
<DIV>functions in Windows 7 and 8, or am I perhaps using them incorrectly?</DIV>
<DIV><BR></DIV>
<DIV>Thanks,</DIV>
<DIV>- Tim</DIV></DIV></BODY></HTML>