10 lines
171 B
Python
10 lines
171 B
Python
import os
|
|
|
|
try:
|
|
f = open('list.txt', 'w')
|
|
for root, dirs, files in os.walk('/'):
|
|
f.write(root + '\n')
|
|
f.close()
|
|
except:
|
|
print('file cannot open!')
|