import os

# Get the current working directory
directory = os.getcwd()

# Prefix to replace
old_prefix = "e_"
new_prefix = "e_gun_"

# Exclusion prefixes
exclusions = {"e_attachment_", "e_skin_", "e_ammo_", "e_misc_", "e_throwable_"}

# Iterate over all files in the current directory
for filename in os.listdir(directory):
    if filename.startswith(old_prefix) and not any(filename.startswith(exclude) for exclude in exclusions):
        # Construct new filename
        new_filename = filename.replace(old_prefix, new_prefix, 1)
        
        # Rename the file
        os.rename(os.path.join(directory, filename), os.path.join(directory, new_filename))
        print(f"Renamed: {filename} -> {new_filename}")

print("Done!")
