Hi I am trying to create a windows bat file that checks if a folder contains files of a specify extension and the runs some basic command. Something like:
set inputFolder=%1
if [%inputFolder%.containsExtension("class")] goto exists
goto end
:exists
:end
but how do I check the extension of the files in inputFolder?
The simplest way to do this is
using ausing EXISTS directive.dircommand and checking the ERRORLEVEL environment variable