Finding files in folders

Results 1 to 2 of 2

Thread: Finding files in folders

  1. #1
    Join Date
    Dec 1969

    Default Finding files in folders

    I know there is a method called FileExists and a method FolderExists to find out if either a specific file or folder exists. But I want to know if there is a way to see if there are ANY files in a specified folder.<BR><BR>Thanks

  2. #2
    Mike Cramer Guest

    Default RE: Finding files in folders

    The files collection has a Count property.<BR><BR>Dim fs, f, fc, fcCount<BR> Set fs = CreateObject("Scripting.FileSystemObject")<BR> Set f = fs.GetFolder(folderspec) &#039 f is folder object<BR> Set fc = f.Files &#039fc is files collection<BR> fcCount = fc.Count<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts