pass in the command to run to the recurse_path function