[plt-scheme] with-input-from-file

From: wooks . (wookiz at hotmail.com)
Date: Tue Mar 9 08:31:09 EST 2010

> > On Tue, Mar 9, 2010 at 11:27 AM, wooks . <wookiz at hotmail.com> wrote:
> >> Ah hah...... understood what I was supposed to do now. (directory-list) is
> >> calling the file numbers.txt.txt ......
> >> thats not what the file is called. It's put an extra .txt suffix on it.
> > 
> > I haven't used Windows on a regular basis for about 8 years, but when
> > I did use it there was an option to hide file suffixes. My guess is
> > this option still exists and you have this option turned on. Try this
> > 
> > (rename-file-or-directory "numbers.txt.txt" "numbers.txt")
> > 
> > and see what happens. If Explorer (or whatever the Windows file system
> > viewer is called these days) shows the file as just numbers then we've
> > found the problem.
> I would put money on that. (directory-list) is telling you the file's REAL name, and (with-input-from-file...) is looking for it by its REAL name. Windows Explorer is hiding part of the name from you. When I sit down at a Windows machine, one of the first things I do is uncheck the "Hide suffixes for known filetypes" option so I can see what my files are really named.

Yeah I know Windows does stuff like that so before my last post I rightclicked on the file name and looked at file properties for the name and it said numbers.txt.  I thought that settled it.


I will have to wait to get home to try your latest trick.

We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100309/fc6fb564/attachment.html>

Posted on the users mailing list.