windows - How to split a file name by dot and get the 2 last portion -
so problem filename such as:
"a.b.c.d.e.f.g" and need 2 last portions. in case,
"f.g" and don't know how many dots string have.
thx help!
@echo off setlocal set "fname=a.b.c.d.e.f.g" %%a in (%fname%) %%b in (%%~na) echo %%~xb%%~xa
Comments
Post a Comment