#!/usr/bin/env python3

import os

path = os.walk(".")

for root, directories, files in path:
    for i in files:
        if (i.endswith(".psd") or i.endswith(".psb") or i.endswith(".dat")):
            filename1 = os.path.join(root, i)
            with open(filename1, "rb") as f:
                s = f.read()
                i1 = s.find(b'Copyright')
                if (i1 >= 0):
                    a1 = b''
                    while (s[i1:i1+1] != b'\0'):
                        a1 = a1 + s[i1:i1+1]
                        i1 = i1 + 1
                    copyrightstr = a1.decode("utf-8")
                    print("%s - %s"%(filename1,copyrightstr))
