Shell "command.com /c dir e:\*.xls /b/s >e:\fdirdata.txt"
Shell is a VBA function that allows you to run external programs, in this
case command.com. The /c switch tells command.com to run the specified
command, in this case the dir command, then exit.
If you're using a Windows NT computer (this includes Win2k and WinXP) then
use cmd.exe instead of command.com. You can also use the VBA Dir() function
and the VBA file manipulation functions to write your own file.