Re: FileListBox
From: Dave (Nobody_at_Nowhere.Com)
Date: 11/08/04
- Next message: Martin Neumann: "Re: new messages from pop3"
- Previous message: Dave: "Re: Nix my FileSystemObject Code?"
- In reply to: Martin Walke: "Re: FileListBox"
- Next in thread: Martin Walke: "Re: FileListBox"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 8 Nov 2004 11:44:36 -0000
"Martin Walke" <martin.walke@spamvega.co.uk> wrote in message
news:eFluwpXxEHA.4028@TK2MSFTNGP15.phx.gbl...
> Hi David,
>
> Instead of the FileList, you could use the Dir() function.
>
> FName = Dir(<directoryname>, vbNormal)
or even:
FName = Dir(<directoryname> & "\*.*", vbNormal)
Even better is FindFirst,FindNext & FindClose - But that is whole different
game :-)
Dave
>
> do while FName <> ""
> :
> processing here
> FName = Dir()
> loop
>
>
> Check the example in the VB Help
>
> HTH
> Martin
>
>
> "David" <drs58@msn.com> wrote in message
> news:c5e774e3.0411071048.ab218f4@posting.google.com...
>> I'm trying to change the names of files in a particular directory.
>> After specifying the directory, the user specifies a search string to
>> find in the filenames along with the string to replace it with. Based
>> on this, I want to cycle through a FileListBox, looking at each
>> filename, changing the name of those files that are found to contain
>> the search string. (I'm using the FileListBox since I can't locate a
>> function that returns a collection of filenames from a directory.)
>>
>> I'm having a problem figuring out how to cycle through the file list.
>> FileListBox. The following generates an 'Improper property array
>> index' error:
>>
>> filFileList.ListIndex = i (i is a couter incremented within a for/next
>> loop)
>>
>> Thanks,
>> David
>
>
- Next message: Martin Neumann: "Re: new messages from pop3"
- Previous message: Dave: "Re: Nix my FileSystemObject Code?"
- In reply to: Martin Walke: "Re: FileListBox"
- Next in thread: Martin Walke: "Re: FileListBox"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|