我想搜索和替换文本文件中的一些文件路径。 我的文件平均大小超过2GB。你知道吗
例如: 我的D驱动器中有一个文件夹“D:\LargeFilesFolder”。 所有文件都存在于文件夹中。你知道吗
"D:\LargeFilesFolder\large_file_v001.txt"
"D:\LargeFilesFolder\large_file_v002.txt"
"D:\LargeFilesFolder\large_file_v003.txt"
在所有文本文件中,我要搜索"X:\path\link\here"
并替换为"Y:\here\link\path"
在python中读取和编辑大文本文件的最佳优化python方法是什么。。?你知道吗
遍历这些行并编写一个新文件。然后将新文件移到旧文件上。你知道吗
相关问题 更多 >
编程相关推荐