import os

def replace_files(dir_root): 
    for dirpath, dirs, files in os.walk(dir_root): 
      for filename in files:
        fname = os.path.join(dirpath, filename)
        if fname.endswith('.new'):
          os.remove(fname[:-4])
          os.rename(fname, fname[:-4])

dir_root = "/home/liyiwen/Documents/projects/tracks/linux-stable"
replace_files(dir_root)
        

5168e83ba44f598084de7cbf1c017e7dd72e59f5
<mask token>


def replace_files(dir_root):
    for dirpath, dirs, files in os.walk(dir_root):
        for filename in files:
            fname = os.path.join(dirpath, filename)
            if fname.endswith('.new'):
                os.remove(fname[:-4])
                os.rename(fname, fname[:-4])


<mask token>

<mask token>


def replace_files(dir_root):
    for dirpath, dirs, files in os.walk(dir_root):
        for filename in files:
            fname = os.path.join(dirpath, filename)
            if fname.endswith('.new'):
                os.remove(fname[:-4])
                os.rename(fname, fname[:-4])


<mask token>
replace_files(dir_root)

<mask token>


def replace_files(dir_root):
    for dirpath, dirs, files in os.walk(dir_root):
        for filename in files:
            fname = os.path.join(dirpath, filename)
            if fname.endswith('.new'):
                os.remove(fname[:-4])
                os.rename(fname, fname[:-4])


dir_root = '/home/liyiwen/Documents/projects/tracks/linux-stable'
replace_files(dir_root)

import os


def replace_files(dir_root):
    for dirpath, dirs, files in os.walk(dir_root):
        for filename in files:
            fname = os.path.join(dirpath, filename)
            if fname.endswith('.new'):
                os.remove(fname[:-4])
                os.rename(fname, fname[:-4])


dir_root = '/home/liyiwen/Documents/projects/tracks/linux-stable'
replace_files(dir_root)

import os

def replace_files(dir_root): 
    for dirpath, dirs, files in os.walk(dir_root): 
      for filename in files:
        fname = os.path.join(dirpath, filename)
        if fname.endswith('.new'):
          os.remove(fname[:-4])
          os.rename(fname, fname[:-4])

dir_root = "/home/liyiwen/Documents/projects/tracks/linux-stable"
replace_files(dir_root)
        
