Yes, to put in an application. And yes again, I can use the "choose...#LFiles" command. If nothing comes up, then it means there are no files. I was hoping to use the windows file choose box if there are files, just because it looks window-y. So I think my choice is either this Choose #LFiles, or do Albert's test using Dir and then put up the filenameplus windows choose.
Karen -----Original Message----- From: Albert Berry <[email protected]> To: RBASE-L Mailing List <[email protected]> Sent: Wed, Aug 6, 2014 10:15 am Subject: [RBASE-L] - Re: Counting files in a directory Are you doing this within a procedure, or just looking while developing? CHOOSE var FROM #LFILES IN *.rmd will bring up all the rmd's but I don't know how you would do this as an "IF file exists" type of thing. Albert On 8/6/2014 8:55 AM, Karen Tellef wrote: Using 9.5, 64-bit, and have the Power Plugin pack available to me. Back in 7.6, ChkFile worked with wildcards even though the documentation said the results would be inconsistent. For example, if you wanted to see if there are any excel files in a directory, you could: set var vcount = (chkfile('c:\temp\*.xls')) It would return 1 if there were files, 0 if there wasn't. So now I'm in 9.5 and I want to check if there are files in a directory. The ChkFile doesn't work for this, and I looked thru the plugin document and don't see a filecount. Is there a nice elegant way to do this now, or do I have to do directories to a file to a temp table, etc... Karen

