Created
June 23, 2011 07:25
-
-
Save drnextgis/1042090 to your computer and use it in GitHub Desktop.
check-modis.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os,fnmatch | |
def main(): | |
rootPath = './PullDir' | |
for root, dirs, files in os.walk(rootPath): | |
files.sort() | |
hdffiles = fnmatch.filter(files, '*.hdf') | |
if (len(hdffiles) != 0): | |
print os.path.join(root) | |
for j in range(1,366): | |
tr = False | |
for filename in hdffiles: | |
if int(filename[11:14]) == j: | |
tr = True | |
exit | |
if not tr: | |
print j | |
return 0 | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment