This commit is contained in:
2024-07-10 11:17:44 +08:00
parent 4fd3fe49bc
commit 70d3974058
4 changed files with 37 additions and 240 deletions
+24
View File
@@ -0,0 +1,24 @@
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')