I'm trying to write a batch script that will check if there are any files in a directory, and if there are call another script. Here is what I have :

```
@echo off

for /f %%A in ('dir /b "..\data\partials\processing"^| find /v /c ""') do set cnt=%%A

if %cnt% gtr 0 
(
    call otherscript.bat
) 

```

Every time I run it I get (and a million permutations I have tried) 

"The syntax of the command is incorrect."

but when I run the same command at the prompt dir /b ..\data\partials\processing | find /v /c "" it works without issue.

I'm more familiar with Bash than Batch... can someone please help?

PS> Please don't suggest powershell, it's not an option. I'm modifying an existing script.

```
@echo off
call %~dp0..\config\script\set_environment.bat
copy %ENDECA_PROJECT_DIR%\test_data\partial\* %ENDECA_PROJECT_DIR%\data\partials\incoming
for /F %%i in ('dir /b "..\data\partials\processing\*.txt"') do ( call call %~dp0runcommand.bat --skip-definition PartialUpdate 2>&1 )

```