Substring in a list of entries
I have a variable that contains a list of filenames and based on the
extension, I need to perform different action. I am not able to extract
the extension inside the loop
set BINARIES=file1.dll fil2.dll fil3.sys
:: for each file in list of binaries do
FOR %%G IN (%BINARIES%) DO (
:: if extension is dll
if /i [%%G:~-4%]==[.dll] (
echo dll file
) else (
echo sys file
)
)
If condition is always failing. How to correctly extract the extension.
No comments:
Post a Comment