?
Solved

Shell Command

Posted on 2003-03-18
4
Medium Priority
?
283 Views
Last Modified: 2010-05-01
Hey, using the 'shell' command is it possible to list the contents of a folder i.e. using Shell"C:WINDOWS/" and then list the contents of the windows folder. Any suggestions how to do this?
0
Comment
Question by:Emmel
[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
  • 2
4 Comments
 
LVL 14

Expert Comment

by:aelatik
ID: 8158371
Not with the shell command, try

Dim fname, Myval
fname = Dir("C:\WINNT\*.*")
Do While fname > ""
   Myval = Myval & fname & vbCrLf
   fname = Dir
Loop
MsgBox Myval
0
 
LVL 14

Expert Comment

by:aelatik
ID: 8158374
In your case it would be :

Dim fname, Myval
fname = Dir("C:\WINDOWS\*.*")
Do While fname > ""
   Myval = Myval & fname & vbCrLf
   fname = Dir
Loop
MsgBox Myval
0
 
LVL 6

Accepted Solution

by:
DrTech earned 90 total points
ID: 8158753
shell("explorer c:\windows")
0
 

Expert Comment

by:CleanupPing
ID: 8899985
Emmel:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

762 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