Solved

DIR /S for Visual Basic?

Posted on 1998-08-17
1
213 Views
Last Modified: 2013-11-25
I have a function that I wish to perform on every file on my hard drive.  I have the function working but for only one file selection at a time.
More detail...I would like to scan all the files on any hard drive I select and  evaluate each filename and path and if filename is of a certain extension, concatenate certain characters of the filename and path into a string which I would like to send to a ascii database file.  Therefore, if 325 files meet the criteria, the database would have 325 strings separated by a space with the concatenated string segments ie
   34123456   c:\r34\123456.drw
   51213141   d:\hello\f51\213141.drw
   82135455   f:\stuff\goodstuf\x82\135455.drw
0
Comment
Question by:JACKO
[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
1 Comment
 
LVL 12

Accepted Solution

by:
mark2150 earned 50 total points
ID: 1429476
Good old DOS SHELL command:

ext = ".XXX"     ' Set to desired extension
SHELL( "C:\COMMAND.COM DIR C:\*." & ext & " /s /b /-p > ASCII.TXT", 1)

When this command completes you'll have a vanilla ASCII file, ASCII.TXT with the file names and paths.
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

Suggested Solutions

Title # Comments Views Activity
Add a task in Outlook from access 11 43
Help me. 3 69
Automatically generate a pdf file from an excel file and email out everyday 2 67
Why use this lambda? 12 62
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

756 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