Hi! am trying to use a IF EXIST in my batch file and I created a sample batch to test this on how to use it. But somehow it doesn't work. can somebody please tell me what I'm doing wrong here.
echo off
if exist c:\batch jobs\ps_change_order.sql (
echo file exist
)
if not exist c:\batch jobs\ps_change_order.sql (
echo file does not exist
)
:end
echo End of batch program.
the result when I execute this is..
file exist
The system cannot find the path specified
file does not exist
End of batch program
echo off
if exist c:\batch jobs\ps_change_order.sql (
echo file exist
)
if not exist c:\batch jobs\ps_change_order.sql (
echo file does not exist
)
:end
echo End of batch program.
the result when I execute this is..
file exist
The system cannot find the path specified
file does not exist
End of batch program