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

File completion without space/executable extensions

Discussion in 'Support' started by wcfi, Dec 1, 2011.

  1. wcfi

    Joined:
    Aug 31, 2011
    Messages:
    13
    Likes Received:
    0
    I'm sure this is a simple thing, but I've confused myself by going in circles through the manual.

    If I want to file complete PDFs from the empty command line without having to type an initial space, and have it open whatever is in the ASSOC/FTYPE for pdfs do I need to do all this:

    @SET .PDF=%@word[0,%@ftype[%@assoc[.pdf]]]

    Or is there some more obvious way that defaults to using the registry association? Thanks.
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    Well, you could

    Code:
    set .pdf=start /pgm
    
    Amounts to pretty much the same thing.
     
  3. TEA-Time

    Joined:
    Jun 2, 2008
    Messages:
    282
    Likes Received:
    1
    And if you have other extensions you want to do the same thing with, you can gang 'em up on one line like so:
    Code:
    set .pdf;.txt=start /pgm
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,952
    Likes Received:
    30
    On Thu, 01 Dec 2011 21:59:15 -0500, wcfi <> wrote:

    |Or is there some more obvious way that defaults to using the registry association? Thanks.

    There is. Read about the PathExt option and the PATHEXT environment variable.
    In short, turn on the PathExt option (if needed) and add ";.PDF" to the PATHEXT
    environment variable.
     

Share This Page