python monitor directory for files count

Solutions on MaxInterview for python monitor directory for files count by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
showing results for - "python monitor directory for files count"
Jeanne
20 May 2016
1import os.path
2path = os.getenv('HOME') + '/python'
3num_files = len([f for f in os.listdir(path)if os.path.isfile(os.path.join(path, f))])
4