-
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
-
DOS is still there in WinME -- it has to be :) It's just hidden, that's all.
-
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.
-
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?
-
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.