access to file by name

I want to manage a bunch of files in subfolder o a folder of mine.

I find the main folder, the sub-folders, but doing anything with these subfolders make crash my app.
In the debugger I see my subfolder is not nil, but is not readable.

  dim f as FolderItem
  dim f2 as FolderItem
  dim f3 as FolderItem
  f = SpecialFolder.Documents.Child("myDamnFolder")    //this is my main folder . I can read the content
  f2 = f.child(nf2)                 // subfolder: it is not NIL, but I cannot browse it
  if f2.IsReadable = false then
    msgbox "Doh!"
    exit sub
    f3= f.child(nf2).child(nf3) //this should be the document in the subfolder, but I never get it.
  end if

of course, permissions are regular

where is my error? I don’t need to list files in the folder, I need to access to that file. Opern read, write…
I use an old, registered Ral Basic 2009 R3. But I saw that my unregistered Xojo does the same.

What is the value of f2.Exists?

it’s false!
but absolutepath, shellpath and urlpath are coherent and -I think - right!

Right. They should be “correct”. They just don’t point to an actual file. (You have to be able to create a correct path to a non-existing file in order to be able to create the file.)

F2 is an existing folder, in which I would read existing files. Isn’t filderitem.child the correct method to read an existing folder/file?

It is. Are you absolutely certain the file does exist there? If so, it’s probably a permissions problem at the folder level. Can you iterate through the Items of f?

Ok. I made it and I found my error. I was reading a different myDamnFolder than I thought… what a silly mistake! Thank you very much!!!