Skip to content

Instantly share code, notes, and snippets.

@drnextgis
Created June 23, 2011 07:25
Show Gist options
  • Save drnextgis/1042090 to your computer and use it in GitHub Desktop.
Save drnextgis/1042090 to your computer and use it in GitHub Desktop.
check-modis.py
#!/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