1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

@search[] function

Discussion in 'Support' started by fpefpe, Oct 20, 2008.

  1. fpefpe

    Joined:
    Oct 18, 2008
    Messages:
    238
    Likes Received:
    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?
     
  2. joshjeppson

    Joined:
    Jun 2, 2008
    Messages:
    42
    Likes Received:
    0
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,784
    Likes Received:
    29
    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?
     
  4. fpefpe

    Joined:
    Oct 18, 2008
    Messages:
    238
    Likes Received:
    1
    Re: function

    Greetings --

    Thanks for the suggestions

    /Frank Esposito
     

Share This Page