Trolled through similar questions and am stuck on my script.
Basically, I need this .bat to check the directory for the number of files with the Lockbox prefix, store the count to a variable, and eventually call an .exe to import each of the files.
Here is what I have so far. My problem is that the test directory has a total of 12 txt files, but I only need the ones with the Lockbox prefix (11 of them):
@echo off
set count=0
for %%a in ('dir /a-d /a-h /a-s "\\ip_of_server\Directory\LockBox*.txt"') do set /a count+=1
@echo File count = %count%
pause