S
Steve Rindsberg
It's easy enough to get a listing of specific file types in a given folder in
VBA using something like this (sFolder and sFileType assumed to be string
variables set to the name of the folder and file Type you're after):
sFileName = Dir$(sFolder, MacID(sFileType))
While sFileName <> ""
Debug.Print sFileName
sFileName = Dir$()
Wend
But what if you want a listing of ALL files in a given folder? What do you use
for sFileType? Null doesn't appear to work.
What if you want a listing of files that have no type (files from a PC, for
example)? Files that return a type of "" when queried by
/developer/tools/getfileinfo "filename"
And while we're at it, is it also possible to get a listing of folders within a
folder? If not, is it possible to traverse a directory tree to get listings of
files within folders within folders and so on?
TIA ...
--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
VBA using something like this (sFolder and sFileType assumed to be string
variables set to the name of the folder and file Type you're after):
sFileName = Dir$(sFolder, MacID(sFileType))
While sFileName <> ""
Debug.Print sFileName
sFileName = Dir$()
Wend
But what if you want a listing of ALL files in a given folder? What do you use
for sFileType? Null doesn't appear to work.
What if you want a listing of files that have no type (files from a PC, for
example)? Files that return a type of "" when queried by
/developer/tools/getfileinfo "filename"
And while we're at it, is it also possible to get a listing of folders within a
folder? If not, is it possible to traverse a directory tree to get listings of
files within folders within folders and so on?
TIA ...
--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================