windows - Windows BATCH filter with regex
问题描述
I need to do a bat script to process file one by one, according to a number in the filename. Here is an example of what I can get :
- CDEP_0003.pdf
- CIM_0001.pdf
- ESCALE_0002.pdf
It's possible to loop and process each of those files in an ordered way using regex or something like this to exclude the number and use it as a loop index ? (0001, 0002, 0003 etc..)
解决方案
Simply loop through .*0000\.pdf$
to .*9999\.pdf$
using another answer on how to loop through files matching wildcard in batch file
推荐阅读
- javascript - 如何在本机反应中从动态 UI 将数据上传到服务器
- javascript - 我可以知道一种在 Angular 8 表单中不提交“确认密码”字段的情况下向 Firebase 提交数据的方法吗?
- c++ - 将数据从应用程序单向发送到另一个应用程序的最佳实践
- .net-core - Azure Functions:从 local.settings.json 以外的其他文件获取连接字符串
- c# - 如何使用 AutoFixture / NSubsitute / NUnit 模拟被测对象的方法?
- python - 如何在机器人框架库中使用 selenium webdriver 方法?
- ansible - Ansible playbook 示例代码无法运行
- kubernetes - 使用 MetalLB 入口控制器监控 Kubernetes 集群的 HTTP 代码
- spring - Spring Boot:每次重建应用程序时执行较新版本的 SQL 文件
- .net - 如何防止 RabbitMQ 命名线程?