Model Builder - using Folder name as output file name

6895
10
Jump to solution
10-09-2012 12:19 PM
SteffenCornell
New Contributor II
Hi,

I have put together a model that takes all of the shapefiles in a folder and merges them together.  I basically need to know how to use the name of the folder in the name of the output merged file.  

For instance, let's say that I have a folder with a directory of "G:\GIS\Data\Birds".  So the folder "Birds" is my input folder and includes shapefiles of "robins.shp" and "sparrows.shp".  I want the output name to be "Birds_merged.shp" or "Input Folder Name & Birds".

I have tried using inline variables but then I get the entire directory for the input folder.  Is there a way to access the name property of a folder and use it in the model?

Thanks.
10 Replies
SteffenCornell
New Contributor II

Hope this helps, first two screenshots are of separate models that I had to build and then insert into the third screenshot/model.

The data being processed is located on a network drive

0 Kudos