Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [Help] Extract Filename From Listbox[Solved]

[Help] Extract Filename From Listbox[Solved]

Posts 1–8 of 8 · Page 1 of 1
FA
FatCat00
[Help] Extract Filename From Listbox[Solved]
I need help extracting the filename from an item on a listbox
Code:
Ex. C:\Documents and Settings\User\My Documents\Test.txt
i want to extract the "Test.txt" into a second listbox any ideas?
#1 · 15y ago
Lolland
Lolland
"Extract"?

Listbox2.items.add (Listbox1.Items.indexof(0))

Something like that, amirite?
#2 · 15y ago
FA
FatCat00
i tried the code, but all it gave me in return was an integer D:
#3 · 15y ago
freedompeace
freedompeace
Listbox2.Items.Add(ListBox1.Items(0).Substring(Lis tbox1.Items.LastIndexOf("\")))
#4 · 15y ago
Jason
Jason
Yeah it would only return an integer, seeing as all he did was search for the index of an integer, which your ListBox may not even contain.

Try something like this.
[php]
For each lbItem As String in ListBox1.Items
ListBox2.Items.Add(IO.Path.GetFileName(lbItem))
Next
[/php]
#5 · 15y ago
FA
FatCat00
Thanx Jason /
#6 · 15y ago
Jason
Jason
Quote Originally Posted by FatCat00 View Post
Thanx Jason /
Not a problem.
#7 · 15y ago
Lolland
Lolland
Mkay solved then
#8 · 15y ago
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

  • [Help]Removing item from listbox [solved]By pushdis15 in Visual Basic Programming
    9Last post 15y ago
  • [Help] WMP selecting song from ListBox [solved]By alvaritos in Visual Basic Programming
    10Last post 15y ago
  • HELP~extracting files from differnetBy heydiddledagain in Combat Arms Help
    0Last post 16y ago
  • [Help]Removing items from ListViewEx? [Solved]By Invidus in Visual Basic Programming
    5Last post 15y ago
  • [Help]Reading filenames to a listbox[Solved]By nathanael890 in Visual Basic Programming
    4Last post 16y ago

Tags for this Thread

None