Batch file could not be found

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
linuxteche
Posts: 10
Joined: 26 Nov 2017 03:17

Batch file could not be found

#1 Post by linuxteche » 04 Jun 2018 09:14

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?

MarioZac
Posts: 38
Joined: 16 May 2018 00:12

Re: Batch file could not be found

#2 Post by MarioZac » 04 Jun 2018 10:19

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.

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Batch file could not be found

#3 Post by penpen » 04 Jun 2018 14:04

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

linuxteche
Posts: 10
Joined: 26 Nov 2017 03:17

Re: Batch file could not be found

#4 Post by linuxteche » 05 Jun 2018 01:57

thanks for your inputs. I used the set variable for -w %PPI% to fix the the issue.

Post Reply