#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default dos

When I type out FIND in DOS....it finds the word, but if I put it in a batch
file, it doesn't come up with an answer. Is there any difference between
regular DOS and the window of DOS in that regard?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default dos

No.

--
Regards,
Tom Ogilvy

"denny" wrote in message
...
When I type out FIND in DOS....it finds the word, but if I put it in a

batch
file, it doesn't come up with an answer. Is there any difference between
regular DOS and the window of DOS in that regard?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default dos

I tried again and it worked. Patience must be the key. This was what
worked.
My file was called findtest so when it finds a word in a dos file you type
findtest Heart, for an example. The way it is now, it is case sensitive.

rem prompt $
rem @ echo off
find "%1" /c c:\mydocu~1\findtest.txt c:\mydocu~1\found1.txt
find "%1" c:\mydocu~1\findtest.txt c:\mydocu~1\found2.txt
copy c:\mydocu~1\found1.txt+c:\mydocu~1\found2.txt c:\mydocu~1\found.txt
type c:\mydocu~1\found.txt
rem cls


"denny" wrote:


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default dos

find has another switch /I means ignore case.

You can type:
find /h
at the command prompt and see more info.

denny wrote:

I tried again and it worked. Patience must be the key. This was what
worked.
My file was called findtest so when it finds a word in a dos file you type
findtest Heart, for an example. The way it is now, it is case sensitive.

rem prompt $
rem @ echo off
find "%1" /c c:\mydocu~1\findtest.txt c:\mydocu~1\found1.txt
find "%1" c:\mydocu~1\findtest.txt c:\mydocu~1\found2.txt
copy c:\mydocu~1\found1.txt+c:\mydocu~1\found2.txt c:\mydocu~1\found.txt
type c:\mydocu~1\found.txt
rem cls

"denny" wrote:


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default dos


/I means ignore case.--That one worked for me, but find /h and findstr /?
didn't bring up anything



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default dos

Doh! I think /h worked with old versions of DOS (3.x??).

But
find /?
did work from a cmd prompt in winXP home:

C:\find /?
Searches for a text string in a file or files.

FIND [/V] [/C] [/N] [/i] [/OFF[LINE]] "string" [[drive:][path]filename[ ...]]

/V Displays all lines NOT containing the specified string.
/C Displays only the count of lines containing the string.
/N Displays line numbers with the displayed lines.
/I Ignores the case of characters when searching for the string.
/OFF[LINE] Do not skip files with offline attribute set.
"string" Specifies the text string to find.
[drive:][path]filename
Specifies a file or files to search.

If a path is not specified, FIND searches the text typed at the prompt
or piped from another command.



denny wrote:

/I means ignore case.--That one worked for me, but find /h and findstr /?
didn't bring up anything


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"