>Hi James,
>
>>I am doing what I "believe" is correct but the value always returns a "0" and it should return the file count.
>
>First, make sure the directory is not hidden, then do:
>
>?dire('C:\programfiles\')
>
>Make sure this is the correct spelling, your originla post had no space (Usually there is :-), then make sure there are actual files, folders don't count, to get folders, do:
>
>?adir(aFiles, 'C:\program files\*', 'D')
Another option is to use the Scripting.FileSystem option to open a Folder object, and then access the subfolders and files collections of the Folder object.