首页 > 解决方案 > 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 :

  1. CDEP_0003.pdf
  2. CIM_0001.pdf
  3. 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..)

标签: windowsbatch-filescripting

解决方案


Simply loop through .*0000\.pdf$ to .*9999\.pdf$ using another answer on how to loop through files matching wildcard in batch file


推荐阅读