def download_all_files(data_folder="{}/astrometry/data".format(os.getenv('PANDIR'))):
    download_IERS_A()

    for i in range(4214, 4219):
        fn = 'index-{}.fits'.format(i)
        dest = "{}/{}".format(data_folder, fn)

        if not os.path.exists(dest):
            url = "http://data.astrometry.net/4200/{}".format(fn)
            df = data.download_file(url)
            try:
                shutil.move(df, dest)
            except __HOLE__ as e:
                print("Problem saving. (Maybe permissions?): {}".format(e))
dataset/ETHPy150Open panoptes/POCS/panoptes/utils/data.py/download_all_files