File completion without space/executable extensions

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Aug 31, 2011
13
0
#1
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.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,376
39
Albuquerque, NM
prospero.unm.edu
#2
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.
Well, you could

Code:
set .pdf=start /pgm
Amounts to pretty much the same thing.
 
#4
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.