import os

link_txt = open(r"C:\Users\Fenoglia\Downloads\cmip6-scripts\links.txt", 'r', encoding='utf-8')
existing_links = os.listdir(r"C:\Users\Fenoglia\Downloads\cmip6-scripts\cmip-xmls")
links = link_txt.read().split('\n')
link_txt.close()
file_name_set = set()
link_set = set()
for link in links:
    link_set.add(link)
    file_name = link.split("#")[0].split('/')[-1]
    if file_name in existing_links:
        continue
    else:
        print(link)
