Solved

Scan Text files

Posted on 2000-04-21
3
147 Views
Last Modified: 2012-05-04
Hi can some one tell me or point me to the right place to find some code Ok what i want to do is scan all my computer and find were Text files are and them addthem to a list box with there paths. I hope some one can help me thanks

sorry I ant got many points to offer
0
Comment
Question by:dreamvb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 2739199
http://www.mvps.org/btmtz/drvscan/

look there for good file search program.  it will take a little tweeking to get it to do what you want however
0
 
LVL 12

Accepted Solution

by:
mark2150 earned 18 total points
ID: 2739870
SHELL "C:\COMMAND.COM /C DIR C:\*.TXT /S /B /ON /-P > C:\X"

(wait for command to complete or use ExecCmd)

List1.Clear
FileID = FreeFile
Open "C:\X" for input as #fileID
  Do While not EOF(FileID)
  Line Input #FileID, Txt
  List1.Additem Txt
  Loop
Close #FileID

This will give you a sorted list of all .TXT files on your C: drive including their paths in your list box. It's quick and dirty but saves literally pages of VB API code.

M
0
 
LVL 4

Author Comment

by:dreamvb
ID: 2740708
Thanks just what I was looking for
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month6 days, 13 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question