Get all files on disk in python

  file, python, windows

im creating script in python that get all files on disk, but no folders only files. Its my code.`import hashlib
import os

if os.name != "nt":
print("Sorry this script works only on Windows!")

path = "C://"
dir_list = os.listdir(path)
print(dir_list)`

Source: Windows Questions

LEAVE A COMMENT