Skip to content

Instantly share code, notes, and snippets.

@kathysll
Created November 7, 2019 15:18
Show Gist options
  • Save kathysll/f6c101f6d3432cc933f3c7e347a1467e to your computer and use it in GitHub Desktop.
Save kathysll/f6c101f6d3432cc933f3c7e347a1467e to your computer and use it in GitHub Desktop.
import os
cr2Directory = "//tank4/production/2018/geomni/ga/USGAATL/raw_data/GV1704A_N4950U_D20181211_A"
jpegDirectory = "//tank4/production/2018/geomni/ga/USGAATL/project_data/imagery/GV1704A_N4950U_D20181211_A"
cr2List =[]
jpegList=[]
for root, dirs, files in os.walk(cr2Directory):
for filename in files:
if filename.endswith(".CR2"):
newfilename = os.path.splitext(filename)[0]
cr2List.append(newfilename)
for root, dirs, files in os.walk(jpegDirectory):
for filename in files:
if filename.endswith(".jpg"):
newfilename = os.path.splitext(filename)[0]
jpegList.append(newfilename)
listDifference = list(set(cr2List) - set(jpegList))
for name in listDifference:
print(name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment