|
-
Apr 9th, 2001, 12:39 PM
#1
Thread Starter
Junior Member
I could proubly solve this myself if my stupid school computers running NT could do anything right and not crash when I open the VB help, but alas we live in an imperfect world.
Anyway, here is my question:
I wanna make a text file that lists all the subdirectories and files from the root of C. Using shell it would be simple: "dir /s > files.txt". But I want to do this without using Shell. It doesn't have to be with API either if it can be done with regular VB functions.
The only reason I don't want to use Shell is because I'm unsure if it will work on WinME. I've been told they got rid of DOS for some stupid reason.
Thanks
-
Apr 9th, 2001, 01:17 PM
#2
Monday Morning Lunatic
DOS is still there in WinME -- it has to be It's just hidden, that's all.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Apr 9th, 2001, 06:23 PM
#3
New Member
Yes, MS-DOS still exists. The difference is that when you start up the computer, it doesn't start up in DOS first. It directly goes to loading Windows - making the loading time significantly faster. You can still do boot disks and the like. There's really no disadvantage that I can see with my WinME machine.
Anyway, to your question. As long as you realize that you must create a .bat file with the dir command to be executed, then you'll be fine in any windows os.
-
Apr 9th, 2001, 11:31 PM
#4
Thread Starter
Junior Member
So shelling will work in WinME? sounds good. Now what about what you said about making a .bat file. Why must I do that exactly?
-
Apr 10th, 2001, 08:31 AM
#5
New Member
Because (and corrent me if I'm wrong, or show me a method where you don't have to use the .bat) using the shell command like this doesn't work:
Shell "dir C:\ /s > C:\file.txt"
It will give you the error that the file "dir" does not exist. I've also experimented with doing:
Shell "Command.com dir C:\ /s > C:\file.txt"
But with no success.
So a work-around is to save the command to a .bat file, execute it, and then you'll have your results.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|