ModelBuilder Iterate Files file extension matches too many files

3734
1
Jump to solution
06-18-2015 01:45 PM
TedRakel
New Contributor III

I'm writing a model to find all the .las files in a folder and create a Las Dataset from those .las files.  I'm using the IterateFiles iterator and set the extension to "las", the period before the extension is not needed.  The problem is that there's already a .lasd file in the folder and the IterateFiles iterator matches this.  It matches "lasd" in addition to "las".  So I end up trying to create a Las Dataset from some las files and a .lasd file, which fails of course.  Is there a way to filter out the .lasd file from the file collection?  I tried using wildcards in the IterateFiles, like *.las or *.las$ but that didn't work either.  I'm using arc gis 10.2.1.  Here's a screen shot of the model.

findLasFiles.PNG

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
IanMurray
Frequent Contributor

could you just move the Las Dataset to another folder other than the one with all the .las files?

In model builder there I'm not sure there is a  way to fix this, but with python you could check if the file ended with the letter d, then remove it from the list of files for input.

View solution in original post

1 Reply
IanMurray
Frequent Contributor

could you just move the Las Dataset to another folder other than the one with all the .las files?

In model builder there I'm not sure there is a  way to fix this, but with python you could check if the file ended with the letter d, then remove it from the list of files for input.