# inspectData.py
# Purpose: Report the number of files and the number of 
#          feature classes in the location supplied by the user.
# Author: <Your name and unity ID>
# Usage: path_to_datasets
# Example input: C:/gispy/data/ch01
import arcpy, os, sys

# Get the user input.
myDir = sys.argv[1]

# Get a list of files in the user-input path.
myFiles = os.listdir(myDir)

# Count the files in the list.
fileCount = len(myFiles)

# Create a message to report the count.
message = "There are {0} files in {1}.".format(fileCount, myDir)

# Print the message.
print(message)

# Set the arcpy workspace to the user-input path.
arcpy.env.workspace = myDir

# Get a list of feature classes in the arcpy workspace.
fcs = arcpy.ListFeatureClasses()

# Count the files in the list.
fcsCount = len(fcs)

# Create a message to report the count.
message = "There are {0} feature classes in {1}.".format(fcsCount, myDir)

# Print the message.
print(message)

