Problem creating listing file of LanMan directory
Dave Higton (1515) 3559 posts |
I’m trying to create a text file of all the filenames on a LanMan drive. I’m searching through each folder, starting from the root, using OS_GBPB 10. On reaching a directory, I stack the location and go through that directory. Etc. However, in the root directory there is a directory called “lost+found”. OS_GBPB complains of “Access denied”, error 91828 (decimal). But the offset in R4 to the next item is not incremented. As far as I can see, this either takes me into an infinite loop, or requires me to stop the search there; I tried incrementing the pointer by 1 myself, but it didn’t appear to help. Have I missed something? Is there a solution or a better way? If I can get past this problem with access denied to a directory, there are also a couple of files that will, I believe, also come up as access denied. |
Colin (478) 2433 posts |
Does count count all the files or find find a file you can’t reach? |
Stuart Swales (8827) 1367 posts |
If enumeration with OS_GBPB 10 stopped at an inaccessible directory in the root dir, you wouldn’t be able to open a Filer window on $? You could examine the object attributes returned by OS_GBPB 10 to see if the file is accessible or the directory may be descended into. |
Colin (478) 2433 posts |
How many objects at a time are you fetching? Try reading 1 object at a time. If you already are, try reading more at a time. |
André Timmermans (100) 656 posts |
If the Filer shows to content of the root directory, you can try it the same way it does: allocates a buffer, try to read all items in the folder, if the buffer is too small, double the size and retry till the buffer is large enough. |
Chris Hall (132) 3583 posts |
Have you tried !Cat – one of its options is to produce a list of all the files on a disc? Also what happens if you try *cat { > sdfs::0.$.file } Note !Cat and *cat are completely different things! |