I have this problem:
I have a lot of this file name in my input directory:
E:\aa.pdf.cc.dd.ee.A01.gg.ff
E:\aa.bb.cc.pdf.ee.A02.gg.ff
I use this script to call another process passing input file and parameter:
Code: Select all
for %%x in (E:\*.pdf.*) do for /F "tokens=6 delims=." %%y in ('dir /b %%x') do call : go %%~nxx %%y
go aa.pdf.cc.dd.ee.A01.gg A01
go aa.bb.cc.pdf.ee.A02.gg.ff A02
This script works if the position A01 of token=6 is always in that position, but sometimes doesn’t.
For example:
E:\aa.pdf.dd.ee.A01.gg.ff
E:\aa.pdf.cc.A02.gg.ff.gg.ll
and I must do the same work. as "go aa.pdf.dd.ee.A01.gg.ff A01"
How can modify my script to get A01, A02. Etc. (the letter A+numer is a constant)
2 issue, the best is to have (go aa.pdf.pdf.dd.A01.gg.ff 01) without A in front the number
Regards
Dario