[GIS] Renaming output to reflect name of input using ArcGIS ModelBuilder

arcgis-10.2arcgis-desktopmodelbuildernaming conventions

Every quarter I will be replacing the two CSV files at the beginning of the model. I would like the final Excel file and feature class to each have a name that reflects the input CSV file name (please see model below). For the example below, I would like to have them renamed as: 2015Q1, as a reflection of the names of the input CSV files.

Is this possible to do?

I am not using 'iteration', which most of the similar questions are referring to.

enter image description here

Best Answer

I would recommend the Parse Path tool in ModelBuilder. Make sure to select the "Name" parse type. In this (very simplified) model, I included a "workspace" variable that I can call at any point and combine with the name value from the parse path output. The syntax for that would be %Workspace%\%Value% in the output path parameter. You should also attach a precondition so that the parse path tool is in sync with the rest of the model.

enter image description here

Related Question