25 lines
558 B
Python
25 lines
558 B
Python
import os
|
|
|
|
|
|
def list_all_files(path):
|
|
file_list = []
|
|
for item in os.walk(path):
|
|
for file in item[2]:
|
|
file_list.append(item[0] + file)
|
|
return file_list
|
|
|
|
|
|
def scan_path_length(path, threshold=180):
|
|
file_path_list = list_all_files(path)
|
|
result_list = []
|
|
for file in file_path_list:
|
|
if len(file) >= threshold:
|
|
result_list.append(file)
|
|
return result_list
|
|
|
|
|
|
if __name__ == '__main__':
|
|
path = r'H:\Mass Storage Drive\classified documents'
|
|
target = scan_path_length(path)
|
|
print('done')
|