AnsweredAssumed Answered

Using user input argument as a wildcard in ListFeatureClasses

Question asked by bogeyone on Jun 30, 2020
Latest reply on Jun 30, 2020 by bogeyone

Hello,

 

I am working on a script that will allow the user to create a list of feature classes, in a directory, where the wildcard is set by a user input argument (sys.argv[2]).  But, I cannot figure out how to get the argument into the optional parameters (between the two asterisks).  Here is the code that I am working on:

 

import arcpy, os

arcpy.env.workspace = sys.argv[1]

arcpy.env.overwriteOutput = True


sub = sys.argv[2]

fileList = arcpy.ListFeatureClasses('**')

 

 

Edited because I just figured out how to insert code.

 

Thanks,

Bill

Outcomes