Re: finding file in program with created filename
I believe it should be
Handler = open("C:\\Downloads\\abgte2\\DATA\\" & filename & ".txt","r")
sixs wrote:
>
>
>I want to open a file using a filename that I create. When I run this
>statement iget a value of -1 .
>
>If I run the statement
> Handler =
>open("C:\\Downloads\\abgte2\\DATA\\SCR001.txt","r")
>I get the file opened.
>
>If I run the statement
>
> Handler =
>open("C:\\Downloads\\abgte2\\DATA\\filename"&".txt","r")
>I get the file not found, -1.
>
>I create the filename with this code
> numfiles = numfiles + 1
> anum = sprintf("%d", numfiles)
>
> if numfiles < 10 then
> filename = "SCR00" & numfiles
> end if
>I tried object filename,
> and sequence filename.
>When I compare the values of what the Dir command finds against what I
>have created, the values are the same
>Thanks for any advice
>jvandal
>
>
>
>TOPICA - Start your own email discussion group. FREE!
>
>
|
Not Categorized, Please Help
|
|