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

From: Noel Welsh (noelwelsh at gmail.com)
Date: Tue Mar 9 06:39:02 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.


> (#<path:array-max.ss>
>  #<path:arrays.ss>
>  #<path:bubblesort.ss>
>  #<path:fib-it.ss>
>  #<path:files.ss>
>  #<path:HTDP>
>  #<path:maxi.ss>
>  #<path:min-of-array.ss>
>  #<path:numbers.txt.txt>
>  #<path:pascal.ss>
>  #<path:sum-console.ss>)
> . . with-input-from-file: cannot open input file: "C:\Documents and
> Settings\Admin\My Documents\Scheme\numbers.txt" (The system cannot find the
> file specified.; errno=2)
> ________________________________
> Do you want a Hotmail account? Sign-up now - Free

Posted on the users mailing list.