Based on my understanding of the ArcGIS path structure, a feature class inside a feature dataset inside a geodatabase can be accessed by the following:
C:\Menu\Lunch.gdb\Sandwich\Cheese
Where Sandwich is the feature dataset and Cheese is the feature class.
In a python script, I want to construct this full path, so that I can check it using arcpy.Exists(x)
. I have the following variables (pseudocode):
WSpace = C:\Menu\Lunch.gdb\
FDSName = Sandwich
FCName = Cheese
Concatenating WSpace
and FDSName
gives the correct path to the feature dataset. What I need help with is tacking FCName
onto the end. I would think the following code would work, but it renders a space instead of the backslash character:
fullPath = WSpace + FDSName + r"\" + FCName
Instead of r"\"
, I have also tried "\\"
, and "/"
, but they all render a space. This seems like a simple syntax problem.