Page 1 of 1 1
Topic Options
#45838 - 2003-09-22 11:57 PM comspec and find
KiXrookie Offline
Fresh Scripter

Registered: 2003-09-19
Posts: 19
i'm having trouble using these commands in the script. can someone tell me what is wrong with the syntax? I always get a "Find: parameter format not correct" A no brainer for anyone who has been using kixtart more than I have but definitely appreciated.(4days)

shell "%comspec% /c find /i "$MyIP" c:\kixtart\ipadds.txt"
If @error=1 goto end
else
RedirectOutput ("c:\kixtart\ipadds.txt") = 0
? $MyIp
endif

:end

Top
#45839 - 2003-09-23 12:13 AM Re: comspec and find
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Try:

code:
shell '%comspec% /c find /i "$MyIP" "c:\kixtart\ipadds.txt"'  

or avoid vars in a string by:
code:
shell '%comspec% /c find /i "' + $MyIP + '" "c:\kixtart\ipadds.txt"'  



[ 23. September 2003, 00:15: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#45840 - 2003-09-23 12:14 AM Re: comspec and find
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sure. damn, hoby was quicker.
indeed, you should check on the faq forum about using quotes with shell.
_________________________
!

download KiXnet

Top
#45841 - 2003-09-23 12:19 AM Re: comspec and find
KiXrookie Offline
Fresh Scripter

Registered: 2003-09-19
Posts: 19
Thanks guys. I can't believe how fast you guys respond!!
Top
#45842 - 2003-09-23 12:37 AM Re: comspec and find
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
we ain't that fast.
you answered to our replies faster than either of us to your question.
so, we actually are quite slow.
_________________________
!

download KiXnet

Top
#45843 - 2003-09-23 04:04 PM Re: comspec and find
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See also the UDF Forum under IsStringInFile() - Checks whether a string is present in a file
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 293 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.053 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org