Page 1 of 1

Batch file could not be found

Posted: 04 Jun 2018 09:14
by linuxteche
Hi, I am trying to execute the below batch file but not sure why I keep getting the error "The batch file cannot be found".

Code: Select all

@echo on &setlocal
setlocal ENABLEDELAYEDEXPANSION
SETLOCAL ENABLEEXTENSIONS

set PPI="C:\PPI"


%PPI%\ppi.exe -c %PPI%\vce.conf -e "Domain=sam;Severity=MAJOR;FreeText=https://google.com;EvtClass=Evolven_Alert;Class=NT_OS;DateTime=may 30 2018"  -w "c:\ppi"

break
How to fix this error? Could you please help where I am doing wrong?

Re: Batch file could not be found

Posted: 04 Jun 2018 10:19
by MarioZac
Why did you Setlocal 3 times? :D

Try changing to

Code: Select all

set "folder=C:\PPI"
, and post any errors. It also depends where you execute the batch from and how exactly.

Re: Batch file could not be found

Posted: 04 Jun 2018 14:04
by penpen
Are you sure, that the content of the above batch file causes the issue?
You might "rem-out" single lines until that batch file works; if it doesn't work and all is "rem-ed out" then:
How do you call your batch, and what is its name?

penpen

Re: Batch file could not be found

Posted: 05 Jun 2018 01:57
by linuxteche
thanks for your inputs. I used the set variable for -w %PPI% to fix the the issue.