List Folders from ToolValidator

Discussion created by efisher16 on Jun 13, 2014
Latest reply on Jun 13, 2014 by Caleb1987
Hi all,

I am trying to learn how to use the ToolValidator to modify the behavior of my script parameters.  I've been using the ESRI help menus and other information I've found online as a reference, but I am not having much luck with my coding. 

I am simply trying to write a ToolValidator script that creates a list of file folders from a hardcoded workspace and displays them as a dropdown menu in the script parameter interface.  I am trying to us os.listdir() to list the folders and then pass them to the parameter list.  Can anyone recommend a better method or recommend any online references /forums with code that does something similar that I can check out?