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

Enhance @EXPAND

Discussion in 'Suggestions' started by Steve Fabian, Mar 6, 2009.

  1. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    Please add support for exclusion ranges to @EXPAND. I just came across a
    case when I had to manually edit the command line to remove all 16 filenames
    matching P* for a Microsoft Word command line.
    --
    Steve
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,732
    Likes Received:
    81
    Steve Fábián wrote:

    @EXPAND already supports ranges.

    Rex Conn
    JP Software
     
  3. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    rconn wrote:
    | Steve Fábián wrote:
    |
    |
    | ---Quote---
    || Please add support for exclusion ranges to @EXPAND. I just came
    || across a case when I had to manually edit the command line to remove
    || all 16 filenames matching P* for a Microsoft Word command line.
    | ---End Quote---
    | @EXPAND already supports ranges.

    ... but the range support excludes exclusion ranges!

    Exclusion ranges are not supported.

    My usage yesterday showed the above statement to be correct.
    --

    Steve
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,732
    Likes Received:
    81
    Steve Fábián wrote:

    %@expand[[!p]*]

    Rex Conn
    JP Software
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    rconn wrote:

    | %@expand[[!p]*]

    This works in my case, because exclusion can be reduced to a character
    position, but exclusion ranges can be much more complex, e.g.
    dir /[!descript.ion *.ini x.*] /a:-d /b
    lists fewer files than what would be its equivalent
    echo @expand[/[!descript.ion *.ini x.*] *,-d]

    The same enhancement for @FILES (which has identical syntax) would also be
    desirable.
    --
    Steve
     

Share This Page