def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('-s', help='Obligatory: source directory path')
    parser.add_argument('-d', help='Obligatory: destination folder path')
    parser.add_argument('-e', help='Obligatory: copy duplicate files (T/True/F/False)')
    args = parser.parse_args(sys.argv[1:])
    source_dir = args.s
    dst_dir = args.d
    df = {'T': True, 'TRUE': True, 'F': False, 'FALSE': False}
    try:
        copy_duplicate = df.get(args.e.upper(), False)
    except AttributeError:
        copy_duplicate = False
        print(f'app.py: error: unrecognized arguments. Use -h or --help to see options')
        exit(1)
    l_lpm = 0
    for (f_inx, source) in enumerate(glob.glob((source_dir + '/**/*.*'), recursive=True)):
        try:
            f = File(source)
            print('----------')
            for log in f.copyCore(source, dst_dir, copy_duplicate):
                l_lpm = (l_lpm + 1)
                print(f'{str(l_lpm)}.{(f_inx + 1)}) {log}')
        except Exception as e:
            print(f'Copy error [{e}]: {source}')
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('-s', help='Obligatory: source directory path')
    parser.add_argument('-d', help='Obligatory: destination folder path')
    parser.add_argument('-e', help='Obligatory: copy duplicate files (T/True/F/False)')
    args = parser.parse_args(sys.argv[1:])
    source_dir = args.s
    dst_dir = args.d
    df = {'T': True, 'TRUE': True, 'F': False, 'FALSE': False}
    try:
        copy_duplicate = df.get(args.e.upper(), False)
    except AttributeError:
        copy_duplicate = False
        print(f'app.py: error: unrecognized arguments. Use -h or --help to see options')
        exit(1)
    l_lpm = 0
    for (f_inx, source) in enumerate(glob.glob((source_dir + '/**/*.*'), recursive=True)):
        try:
            f = File(source)
            print('----------')
            for log in f.copyCore(source, dst_dir, copy_duplicate):
                l_lpm = (l_lpm + 1)
                print(f'{str(l_lpm)}.{(f_inx + 1)}) {log}')
        except Exception as e:
            print(f'Copy error [{e}]: {source}')