Re: Re: Examining a directory with OpenOffice.org Basic

"Johnny Rosenberg" <[email protected]>
Newsgroups gmane.comp.openoffice.devel.api
Message-ID <op.vm1oavcsxqd8ry@pb-laptop>
Den 2010-12-01 14:53:01 skrev Clayton <[email protected]>:

> On 12/01/2010 02:38 PM, Johnny Rosenberg wrote:
>> 2010/12/1 Johnny Rosenberg:
>>> If I know the name of a directory, let's say ~/MyImages, how can I
>>> easily read the names of all the files in that directory? Let's say
>>> that we will fill an array with all the file names.
>>>
>>> I have searched a bit online, but so far I didn't find anything that I
>>> understand… I'll continue searching, though.
>>
>> He he he… I tried again to search for the answer and this time I found
>> it almost immediately… At least I think I did:
>>
>> http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide/Files_and_Directories_(Runtime_Library)
>>
>> Seems to be what I am looking for.
>>
>> Other thoughts about this are still welcome, though.
>
> I'm interested in how useful you find the Basic Guide Wiki page you dug  
> up.  Is it missing info?  Anything unclear etc?  What can be or needs to  
> be improved?
>
> C.

Well, I tried to follow the first example that stores file names, found in  
a directory, to a variable, but it didn't work. The Dir thing didn't find  
anything, even though I know there are 52 jpg files in there. I even  
copied the path name from my file manager. I'm not yet sure why this  
didn't work, but I have had some thoughts about it:

Maybe I can't use spaces in path names? That's too bad, because I do that  
all the time.
Maybe I entered the path name wrong. The example search "C:\" which isn't  
relevant to me, since C: is very Windows/DOS specific; I'm on Ubuntu 10.10  
and my path looks something like "/home/username/some folder/another  
folder/yet another folder/".
Maybe my path name is just too long?

Any hints?

-- 
Kind regards

Johnny Rosenberg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.