Use FileExists("D:\\PDFTest\\print\\*.fdf", my_check) to check if there are any files before using Dir to list them Note that Dir with *.* always works becuase there is always at least one "invisible" file which is the current directory. : The DIR command return "Error starting file search operation", when : there are no matching files in the directory. If the mask is : "*.*" it works. : Here is the script: dim DirList, string : Dir("D:\\PDFTest\\print\\*.fdf", DirList) : messageBox(DirList)
|