|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Script to find and open file. Help.
Hello All.
I’m at the end of my wit here and I was wondering if any one could help me out. My job requires me to monitor an application for several issues that may arise. For every issue there is a corresponding guide/manual on how to deal with the issue. All the guides are stored in one central location. So I would typical browse the central location and find the correct manual. Originally the application itself was designed to automatically open the corresponding guide once the issue alert was received. However, for what ever reason it never worked and no one seemed to be motivated to make it work. Well, I thought to my self here is a perfect opportunity to get organizational wide recognition. If I can get this to work, all will echo my name though out our organization. My name will be synonymous with greatness. However, my efforts have proven to be bitter sweet and I fear people will not recognize me as the intellectual dynamo I truly am. So far I’ve been able to reduce the time it takes me to find the guides/manuals by running these two commands in a DOS screen: echo off FOR %G IN (*.xls) do (findstr /M "issue name" "%G") Once the answer is returned I run copy the guide name into the following command and run it. Start excel "guide name" If at all possible I would like to just automate the entire process so that I just have to enter the issue name. I’ve come up with the script below, but am having problems coding the batch file to open the corresponding guide. Can any one help? REM section (1) used to prompt for job name. @Echo Off :LOOP ClS Echo. Set /P Job=Enter the issue name^> Echo. Set /P Answ=..Enter Y/y to proceed^> If /I not "%Answ%"=="Y" GoTo :LOOP Echo...Just a moment while I find a guide for the job %job% REM Section (2) used to find the guide. f: echo off Rem the double percent sighn i.e "%%" are only used in batch files. other wise it would be a single percent sign. FOR %%G IN (*.xls) do (findstr /M %job% "%%G") Rem this line will later be used to to automaticallys start the support guide. Rem start excel "TSFS EBOInsurance Tidal Monitoring Worksheet Feb-11-08 MS.xls" REM this continues where the section (1) left off. Set Strg= Set File= Set Answ= ::End_Of-Batch |
![]() |
| Viewing: Web Development Archives > FAQs > MS DOS > Script to find and open file. Help. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|