Hi friends,
I just wrote a small batch file that open an application. When it opens that it displays a window with four buttons and by default the cursor in on the firs button. Now I want to click on the second button that browses for the files to open. Now I want to give the path in the batch file such that it opens that specified file and again go to File>>Run.

Now I want a simple batch file to automate this process. I want a batch file that is written in DOS commands.

Any help is appreciated.
Arunmag

Well,
Their is this you could use:

@echo off
:Search
echo Type the file name and extension.
set /p name=
echo Attempting to open %name% . . .
ping localhost -n 3 >nul
if exist %name% GoTo Exist
if not exist %name% GoTo Fail
:Exist
start %name%
msg * Would you like to search for another file? Type y if you do. Type n if you don't
set /p letter=
if %letter% == y GoTo Search
if %letter% == n GoTo Exit
:Fail
echo This file does not exist. Please try again.
echo.
pause
GoTo Search

Sorry, that code is not exact...

@echo off
title Search
color a
:Search
cls
echo Type the file name and extension.
set /p name=
cls
echo Attempting to open %name% . . .
ping localhost -n 3 >nul
if exist %name% GoTo Exist
if not exist %name% GoTo Fail
:Exist
start %name%
cls
echo Would you like to search for another file? Type y if you do. Type n if you don't
set /p letter=
if %letter% == y GoTo Search
if %letter% == n GoTo Exit
:Fail
cls
echo This file does not exist. Please try again.
echo.
pause
GoTo Search
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.