Avatar of santhoshd48
santhoshd48
Flag for India asked on

batch file to read the given path

batch script to check the given path in system,if exists quit,or else read the mif
Windows BatchVB ScriptMicrosoft DOS

Avatar of undefined
Last Comment
devil_himself

8/22/2022 - Mon
devil_himself

or else read the mif ---> mif ??
@echo off
setlocal 
set dr_=C:\Documents and Settings\All Users
 
if not exist "%dr_%" (
    echo Folder "%dr_%" not found
    goto :EOF)

Open in new window

santhoshd48

ASKER
our environment consists of lot of windows xp and vista,i need to check the path cd windows\itlm\example.exe.some machine may have windows and some may hav winnt.it need to check both.
devil_himself

@echo off
setlocal
set dr_=%windir%\itlm\example.exe
 
if not exist "%dr_%" (
    echo "%dr_%" not found
    goto :EOF)
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
santhoshd48

ASKER
do u know how to write mif file
ASKER CERTIFIED SOLUTION
devil_himself

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.