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]Search File Function[Solved]

Question[Help]Search File Function[Solved]

Posts 1–2 of 2 · Page 1 of 1
PP
ppl2pass
[Help]Search File Function[Solved]
How can you search for a file on the computer.
Can anyone give me the function. /
#1 · 16y ago
Blubb1337
Blubb1337
Code:
If file.exists("C:\abc.txt") then
msgbox("C:\abc.txt exists!!!")
end if
Code:
Dim CTBFilPth As String ' CTB Plot Style Files Path
CTBFilPth = "C:\Program Files\AutoCAD LT 2002\Plot Styles\"

So take this and play with it. It will search sub-folders too... When it
finds a CTB file, it adds it to a Combox (cmbCTB):

' Find Plot Styles in Multiple Folders and Lists them
' Get Folder Names Listing in Plot Styles Path
Dim rootDi As New DirectoryInfo(CTBFilPth)
Dim di As DirectoryInfo
For Each di In rootDi.GetDirectories
Dim CTBdirs() As String = Directory.GetFiles(CTBFilPth & di.Name)
For Each CTBfilname In CTBdirs
CTBtestname = System.IO.Path.GetFileName(CTBfilname)
' Test for CTB files and add to Combox 'cmbCTB'
Dim FilTest As String = CTBtestname.Remove(0, (Len(CTBtestname) - 3))
If UCase(FilTest) = "CTB" Then
cmbCTB.Items.Add(CTBtestname)
End If
Next
Next
#2 · 16y ago
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

  • [Help] Deleting files permanently[Solved]By nathanael890 in Visual Basic Programming
    9Last post 15y ago
  • [HELP] Searching FilesBy Lyoto Machida in Visual Basic Programming
    14Last post 15y ago
  • [Help]Key File[Solved]By MJLover in Visual Basic Programming
    7Last post 16y ago
  • [Help]Search TextBox[Solved]By ppl2pass in Visual Basic Programming
    10Last post 16y ago
  • [Help]special functions[Solved]By mnpeepno2 in Visual Basic Programming
    11Last post 16y ago

Tags for this Thread

None