Tuesday 17 January 2017

to list the files and folders in the folders-PYTHON

import os
def openfolder():
    path = raw_input("Enter path..")
    files = os.listdir(path)
    for file in files:
        print(file)
openfolder()

No comments:

Post a Comment