Last active
December 28, 2019 15:00
-
-
Save Bailey3D/d86ef82f0802c0fb1923a2c57e170032 to your computer and use it in GitHub Desktop.
Step through all files on a drive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, win32api | |
drives = win32api.GetLogicalDriveStrings() | |
drives = drives.split("\000")[:-1] | |
path = "D:\\" | |
files = [] | |
for r, d, f in os.walk(path): | |
for file in f: | |
print(os.path.join(r, file)) | |
print("Complete!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment