Hello,
I have a bit of a problem that I can't find a solution to.
I have a list of directories and sub directories. Some contain shapefiles. Some contain tables, gdbs etc. Eg:
S:\\NEW\\170530\\test.shp
S:\\NEW\\170529\\NewData\\NewTest.shp
S:\\OLD\\170428\\test.xlsx
S:\\OLD\\170428\\MoreData\\MoreTest.shp
There are more folders within those dated directories. The root drive is always the same "S:\\"
The root data directories (eg, OLD, NEW) will be provided by users as a user parameter. There won't be any navigating to those specific directories. How can I have a workbench that reads all the shapefiles nested in all those different directories, once the root data directory has been passed to it?
Everything from the PATH reader up to the FeatureReader only specifies up to the dated directory based on user input. Eg:
S:\\NEW\\170530
I saved the directory path and passing the following to the FeatureReader: S:\\NEW\\170530\\**
Now it works.. but with a couple of drawbacks. For one, if it comes across a directory that has no shapefiles, the process terminates. I want it to skip and continue when that happens.
Next, it is very slow. Even though I specified in the FeatureReader to only read shapefiles, it reads dbf and a bunch of other types and it reads really slowly. Something that a simple shape file reader takes 1 minute to read, this one took 10 minutes or more. I need to speed up the process and if a workaround can be found, I would really appreciated.
Any help will be appreciated and thanks!