Windows batch/powershell file to regex find and replace only in files having specific text [closed]

那年仲夏 提交于 2021-01-07 02:31:45

问题


How could I make a Windows batch file to find and rename with regex in files, that have specific text in them?

This is the needed scenario:

If file path is C:\Folder\ and file name is something_*.xml (wildcards allowed) and the file has specific text "9jmnysdrj98074jki" then use regex to find and replace text in all files matching these requirements.

If it's impossible to do that with plain functionality, maybe there are standalone command line tools capable of doing such tasks?

来源:https://stackoverflow.com/questions/65579243/windows-batch-powershell-file-to-regex-find-and-replace-only-in-files-having-spe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!