python5 Python 으로 폴더안의 텍스트 파일들의 문자열 replace 하기 Python 으로 폴더안의 텍스트 파일들의 문자열 replace 하기이다. # https://stackoverflow.com/questions/50037369/find-and-replace-string-from-multiple-files-in-a-folder-using-python import glob for f in glob.glob("*.[ch]"): with open(f, "r") as inputfile: newText = inputfile.read().replace('Version1', 'Version2.2.1') with open(f, "w") as outputfile: outputfile.write(newText) 2021. 9. 19. 이전 1 2 다음