<reponame>ARRETdaniel/Python_exerc-cios
# Pythono3 code to rename multiple
# files in a directory or folder

# importing os module
import os

# Function to rename multiple files
def main():

    folder = "Exercícios"
    for count, filename in enumerate(os.listdir(folder)):
        dst = f"atividade{str(count)}.py"
        src =f"{folder}/{filename}"  # foldername/filename, if .py file is outside folder
        dst =f"{folder}/{dst}"

        # rename() function will
        # rename all the files
        os.rename(src, dst)

# Driver Code
if __name__ == '__main__':

    # Calling main() function
    main()

# Pythono3 code to rename multiple
# files in a directory or folder

# importing os module
import os

# Function to rename multiple files
def main():

    folder = "Exercícios"
    for count, filename in enumerate(os.listdir(folder)):
        dst = f"atividade{str(count)}.py"
        src =f"{folder}/{filename}"  # foldername/filename, if .py file is outside folder
        dst =f"{folder}/{dst}"

        # rename() function will
        # rename all the files
        os.rename(src, dst)

# Driver Code
if __name__ == '__main__':

    # Calling main() function
    main()
# Pythono3 code to rename multiple # files in a directory or folder # importing os module # Function to rename multiple files # foldername/filename, if .py file is outside folder # rename() function will # rename all the files # Driver Code # Calling main() function