Skip to content

Instantly share code, notes, and snippets.

@wlizama
Last active June 13, 2019 16:37
Show Gist options
  • Save wlizama/62736d94b682272d4f334b7605f926eb to your computer and use it in GitHub Desktop.
Save wlizama/62736d94b682272d4f334b7605f926eb to your computer and use it in GitHub Desktop.
from os import listdir
from os.path import isfile, join
MY_DIR = 'Q:\\midir'
def execute():
onlyfiles = [f for f in listdir(MY_DIR) if isfile(join(MY_DIR, f))]
print(onlyfiles)
if __name__ == "__main__":
execute()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment