花糕
Article Cover

Windows使用powershell批量修改文件后缀

367浏览 2025-5-11 软件教程 MA103369

在目标目录下打开powershell:

Get-ChildItem -Path ./ -Filter *.rst -Recurse | Rename-Item -NewName { $_.Name -replace '\.rst$', '.md' }

执行即可把rst全部换成md,替换成自己需要的即可,其中-Recurse是会递归检查子文件夹,'\.rst$'是为了防止.rst.rst这样的情况出现

未经作者允许,禁止转载
#Windows #powershell #pwd
16
5