@search[] function

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Oct 18, 2008
263
1
#1
Greetings --

I have a btm file that takes as input a filename.

The code then used the @search[] function to find the file. For the most part
this works, fine, except for this filename

FPR R&D template 2008.doc

Is there anything I can add to the btm file to process this name?
 
Jun 2, 2008
42
0
#2
Greetings --

I have a btm file that takes as input a filename.

The code then used the @search[] function to find the file. For the most part
this works, fine, except for this filename

FPR R&D template 2008.doc

Is there anything I can add to the btm file to process this name?
The problem is the ampersand character & which is interpreted as a command separator. You can solve this several ways:

1. Temporarily set your command separator to something else:
Code:
  setdos /c~
  ::do work here
  setdos /c&
2. Escape the ampersand in your input (default escape character ^):
Code:
  yourbatchfile.btm "FPR R^&D template 2008.doc"
3. Turn off special characters:
Code:
  setdos /x-5
  ::do work here
  setdos /x+5

- Josh
 
#3
function

On Mon, 20 Oct 2008 19:14:32 -0500, "JP Software Forums"
<neil@jpsoft.com>,fpefpe <> wrote:


>Greetings --
>
>I have a btm file that takes as input a filename.
>
>The code then used the @search[] function to find the file. For the most part
>this works, fine, except for this filename
>
>FPR R&D template 2008.doc
>
>Is there anything I can add to the btm file to process this name?
Perhaps quotation marks? This works here.

v:\> echo "%@search["FPR R&D template 2008.doc"]"
"V:\FPR R&D template 2008.doc"

For you what fails and how does it fail?
 
Oct 18, 2008
263
1
#4
Re: function

On Mon, 20 Oct 2008 19:14:32 -0500, "JP Software Forums"
<neil@jpsoft.com>,fpefpe <> wrote:




Perhaps quotation marks? This works here.

v:\> echo "%@search["FPR R&D template 2008.doc"]"
"V:\FPR R&D template 2008.doc"

For you what fails and how does it fail?
Greetings --

Thanks for the suggestions

/Frank Esposito