PDA

View Full Version : Populate a List box with text file names


Bruce
10-29-2003, 07:21 PM
Sorry, I've looked every where...
I have a folder made on the users C drive when the CD starts up, the user is asked to make a "List" and name it. After clicking done, this will create a text file with the name they chose. This would then be added to the folder that was made earlier. I want a list box to be popuated with what ever text file names that are in that folder.

Please help...:rolleyes:

JimS
10-29-2003, 08:13 PM
Use the Search file function. For file name, look for *.txt Use the Specific folders/drives functions to limit your search to the folder you want. That will return a string with all the text files in that folder.

Corey
10-29-2003, 08:24 PM
Easiest might be LIST BOX OBJECT > ADD FILES action... (self explanatory in its own dialog)

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

Bruce
10-29-2003, 09:01 PM
Hummmm... On page show I did as you said Corey:

ListBoxObject[Lists].AddFiles (End, "%SrcDrv%\C:\flash\*.txt")

But all it shows is a * Ideas?

JimS
10-29-2003, 09:13 PM
Check out the Help file under Command Reference > Actions > List Box Objects > Add Files. At the bottom under Examples, click on “Searching for MP3s and adding them to a list box”. The example will show you everything you need. Of course you will have to replace *.mp3 with *.txt but you’ll get it.

Bruce
10-29-2003, 10:01 PM
Thx Jim! Oh... and of course Corey. :D

Corey
10-29-2003, 10:09 PM
:eek:

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)