finding file in program with created filename

new topic     » topic index » view thread      » older message » newer message

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

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu