0
I am looking to basically check if a batch file is present by wildcard *.reg, but I would like it to error if there is more than 1 .reg file.
This is the code I have been trying to use, but my batch is fairly basic.
if "%%i" GTR 1 in (*.reg) == goto Error2
else do (regedit /s %%i)
Fairly sure I have the logic completely backwards! But I put it here so you have a rough idea of what I am trying to do.
Thanks!
1You should quote the file names in case they contain spaces. – Karan – 2015-06-19T16:09:47.323