Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a model that takes an input layer, which will always be located in a unique folder on my hard drive, and spit out a set of analyses in the same unique folder the input was referenced from.

For example, I want to be able to add "X.shp" to the map from C:\Folder1, run the model, and have the outputs be saved into Folder1 automatically. If "X.shp" was taken from C:\Folder2, I would want the output to be saved automatically in Folder2. Is it possible to automate this?

share|improve this question

The attached model is a really simple implementation of what you describe. There are two parameters "P". The first is the input shapefile and the second is the output name (e.g. Output Feature Class (2)). In this example, you can specify parameters by right-clicking on the tool > Make Variable > From Parameter > Output Feature Class. Here, I used %Value% in the output location which is PATH from the Parse Path tool.

enter image description here

enter image description here

share|improve this answer
This is really useful, thank you! Does this always have to be done using Feature Class to Feature Class? I couldn't figure out how to incorporate other tools, such as a buffer, and get the same results without tying it to the output given in the exact method used in your example. – Gregory Jul 18 '13 at 0:52
In the case of another tool such as Buffer, you need to pass the value off like so %Value%/your_file_name_here. Remember, the %Value% PATH is the pathname which contains the featureclass rather than the direct path to the FC. – Aaron Jul 18 '13 at 13:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.