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:

  • program to write factorial in perl using for loop
  • search file system python
  • factorial program using perl
  • Python Check File Extension
  • get all dates between two dates using java
  • input 5 numbers prints out odd numbers java
  • java autobox integer
  • strikethrough java
  • iterate tuple python
  • examples to underline the font in pdf using java

No comments yet.

Leave a Comment