Statalisters,
While using -filelist- to find all pat("*.dta") files in my chosen directory, I have discovered the problem that the -filelist- falsely detects a ".do" file instead of the ".dta" file that follows it if they have the identical file name.
For example, while running -filelist- on a directory that contains the following two files:
food.do
food.dta
the command -filelist, dir("$directory") pat("*.dta")- will detect and download food.do, but not food.dta. I suspect that this is because of the order of the files.
I have several thousand files that are formatted in that order in company-wide cloud storage, so changing file names or switching the order of files that fit this category is not an option.
Does anyone know a fix for this problem?
Thank you for your help,
Malcolm
While using -filelist- to find all pat("*.dta") files in my chosen directory, I have discovered the problem that the -filelist- falsely detects a ".do" file instead of the ".dta" file that follows it if they have the identical file name.
For example, while running -filelist- on a directory that contains the following two files:
food.do
food.dta
the command -filelist, dir("$directory") pat("*.dta")- will detect and download food.do, but not food.dta. I suspect that this is because of the order of the files.
I have several thousand files that are formatted in that order in company-wide cloud storage, so changing file names or switching the order of files that fit this category is not an option.
Does anyone know a fix for this problem?
Thank you for your help,
Malcolm
Comment