I am looking for a python code that allows me to name an output file(shapefile/dbf) based on input file +user defined suffix. Thereafter I would like to save the output file to a workspace.
via command line or as a python script tool?
without more info, something along the lines of:
import os in_file = arcpy.GetParameterAsText(0) output_workspace = arcpy.GetParameterAsText(1) out_suffix = arcpy.GetParameterAsText(2) out_name = os.path.basename out_name += out_suffix out_filepath = os.path.join(output_workspace, out_name)
As a Python script tool.
So will the above fit into your existing script? do you understand it etc.?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.