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

1 Answer 1


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

  • How do I add a jpg (screenshot) here in comments? @Aaron, I tried Parse Path, connecting it from "2015Q1_B.csv" to both "copy features" and "table to excel". Neither one worked in modifying the final names. I had selected the "Name" parse type. I did not add workspace as I did not think it necessary (I could be wrong though). I used the preconditions as in your example. May 13, 2015 at 18:43
  • You would want to attach Parse Path to the input variable "2015Q1_B.CSV". Then simply attach %Value% to any output path (e.g. C:\path\to\some\folder\%Value%. A precondition may not be necessary if you are not iterating through features.
    – Aaron
    May 13, 2015 at 18:50
  • I tried what you suggested but received an error message: ERROR 000210: Cannot create output: E:\GIS\Locations.gdb\2015Q1_B. Failed to execute (Copy Features (2)). May 13, 2015 at 19:13
  • Did you specify "Name" in the parse path tool?
    – Aaron
    May 13, 2015 at 19:24
  • Yes, I specified "NAME" in the parse type in Parse Path. Is there an issue with including '%' in a gdb pathname? May 13, 2015 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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