Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Python: Search files by extension

Python: Search files by extension

import fnmatch
import os
# find text files in current directory
for file in os.listdir("."):
    if fnmatch.fnmatch(file, "*.txt"):
        print file

Users who found this page were searching for:

  • searching for file extension python
  • python search file with extension
  • input 5 numbers prints out odd numbers java
  • java autobox integer
  • search file system python
  • python search by extension
  • strikethrough java
  • perl script to find factorial of a number
  • factorial program using perl
  • Python Check File Extension

No comments yet.

Leave a Comment