#!/usr/bin/env python3  
import argparse  

def rename_files(prefix):  
    import os  
    for i, f in enumerate(os.listdir()):  
        os.rename(f, f"{prefix}_{i}{os.path.splitext(f)[1]}")  

if __name__ == "__main__":  
    parser = argparse.ArgumentParser(description="Rename files with a prefix.")  
    parser.add_argument("--prefix", required=True, help="Prefix for filenames")  
    args = parser.parse_args()  
    rename_files(args.prefix)  
