Heya again, folks!
Okay, I'm having a bit of difficulty here...I'm assuming there's an easy solution to this I'm just overlooking. I've created a listbox1 which searches a root directory for subdirectories, then displays the subdirectory names as items in listbox1. What I'd like to do next is take the user-selected item from listbox1 and populate a listbox2 with any *.pdf files currently located in whatever subdirectory that listbox1 item corresponds to.
I'm assuming I need to somehow assign the full path as a value to each of those items in listbox1 when I populate it, and that at the moment the full path isn't there since I'm using String.SplitPath to get just the subdirectory name to populate the list.....but I could be wrong!
Any assistance (and specifically an example of the syntax on how to do this) would be very, very much appreciated!!! For reference, below is how I'm arriving at the current items to populate listbox1 with:
--Checking a primary directory for subdirectories.
categories = Folder.Find("C:\\Stuff\\", "*", false, nil);
--Populating my listbox with the "categories".
for index, value in categories do
resSplitPath = String.SplitPath(categories[index]);
result = ListBox.AddItem("ListBox1", resSplitPath.Filename, categories[index]);
end
Thanks so so much in advance!
Okay, I'm having a bit of difficulty here...I'm assuming there's an easy solution to this I'm just overlooking. I've created a listbox1 which searches a root directory for subdirectories, then displays the subdirectory names as items in listbox1. What I'd like to do next is take the user-selected item from listbox1 and populate a listbox2 with any *.pdf files currently located in whatever subdirectory that listbox1 item corresponds to.
I'm assuming I need to somehow assign the full path as a value to each of those items in listbox1 when I populate it, and that at the moment the full path isn't there since I'm using String.SplitPath to get just the subdirectory name to populate the list.....but I could be wrong!
Any assistance (and specifically an example of the syntax on how to do this) would be very, very much appreciated!!! For reference, below is how I'm arriving at the current items to populate listbox1 with:
--Checking a primary directory for subdirectories.
categories = Folder.Find("C:\\Stuff\\", "*", false, nil);
--Populating my listbox with the "categories".
for index, value in categories do
resSplitPath = String.SplitPath(categories[index]);
result = ListBox.AddItem("ListBox1", resSplitPath.Filename, categories[index]);
end
Thanks so so much in advance!
Comment