Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python monitor directory for files count

import os.path
path = os.getenv('HOME') + '/python'
num_files = len([f for f in os.listdir(path)if os.path.isfile(os.path.join(path, f))])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #monitor #directory #files #count
ADD COMMENT
Topic
Name
2+5 =