Bruce
01-01-2004, 07:13 PM
After finding all my folders using the code below:
result = Folder.Find("AutoPlay\\Plugins", "*", false, nil);
for index,folder in result do
folders = ListBox.AddItem("plugs list", folder, folder);
end
(Thanks Corey)
The information is placed into a ListBox as follows:
AutoPlay\Plugins\ Folder 1
AutoPlay\Plugins\ Folder 2
AutoPlay\Plugins\ Folder 3
I would like to show ONLY the name of the folder it’s self, like this:
Folder 1
Folder 2
Folder 3
So… I thought using a String.Replace would do the trick but… Again I’m not getting the right combinations. I tried this:
result = Folder.Find("AutoPlay\\Plugins", "*", false, nil);
for index,folder in result do
result = String.Replace("AutoPlay/Plugs/", "AutoPlay", "", false);
ListBox.AddItem("plugs list", folder, folder);
end
But it didn’t work. Perhaps using the variable “result”…
result = String.Replace("result", "AutoPlay", "", false); NOPE!
What the heqq is the magic combo? I looked through the help files but I didn’t quite get what I was looking for or didn’t understand perhaps the obvious.
result = Folder.Find("AutoPlay\\Plugins", "*", false, nil);
for index,folder in result do
folders = ListBox.AddItem("plugs list", folder, folder);
end
(Thanks Corey)
The information is placed into a ListBox as follows:
AutoPlay\Plugins\ Folder 1
AutoPlay\Plugins\ Folder 2
AutoPlay\Plugins\ Folder 3
I would like to show ONLY the name of the folder it’s self, like this:
Folder 1
Folder 2
Folder 3
So… I thought using a String.Replace would do the trick but… Again I’m not getting the right combinations. I tried this:
result = Folder.Find("AutoPlay\\Plugins", "*", false, nil);
for index,folder in result do
result = String.Replace("AutoPlay/Plugs/", "AutoPlay", "", false);
ListBox.AddItem("plugs list", folder, folder);
end
But it didn’t work. Perhaps using the variable “result”…
result = String.Replace("result", "AutoPlay", "", false); NOPE!
What the heqq is the magic combo? I looked through the help files but I didn’t quite get what I was looking for or didn’t understand perhaps the obvious.