Discussion:
Edit "dir" command
(too old to reply)
Matthias Huck
2004-08-25 09:24:27 UTC
Permalink
Hi,

how can i edit dthe "dir" command, so that comes out something like this:
C:\Programme\Test
C:\Programme\Test1
C:\Programme\Test2
etc.

without filenames, only the folders

Does anyone know?

Regards
Matthias Huck
Björn Holmgren
2004-08-25 09:33:21 UTC
Permalink
Post by Matthias Huck
Hi,
C:\Programme\Test
C:\Programme\Test1
C:\Programme\Test2
etc.
without filenames, only the folders
Are you referring to the DIR command of CMD.EXE or the VB Dir() function?

The DIR command of CMD.EXE won't do that. Check out the TREE command.

In VB you can pass the vbDirectory file attribute to have the Dir() function
return directories as well as files. You'll then have to use the GetAttr
function on each file returned to make sure it's a directory and not a file.

--
Björn Holmgren

Loading...