Python Script for recursive listing of files
Python script for recursive listing of files. 1.import os 2.def printer(filename) : 3. list = os.listdir(filename) 4. for file in list: 5. if os.path.isdir(file) : 6. printer(os.path.join(filename,file)) 7. print os.path.join(filename,file) filename = raw_input(“Enter the filename “) printer(filename)
Posted in Python Tutorial
1 Comment