File size: 585 Bytes
21baa2f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

'''
Created on ٢٩‏/٠٤‏/٢٠١٠

@Created by: Muhammad Altabba
'''

if __name__ == '__main__':
    import os
    from os.path import join, getsize
    for root, dirs, files in os.walk('D:/1/Learning/NLP/برامج/الخليل/AlKhalil_2/db/nouns/roots/'):
        for file in files:
            print(file);
        print(''.join([root, "consumes", " "]));
        print(sum(getsize(join(root, name)) for name in files), " ")
        print("bytes in", len(files), "non-directory files")
        if 'CVS' in dirs:
            dirs.remove('CVS')  # don't visit CVS directories