File completion without space/executable extensions

Aug 31, 2011
14
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.
 
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.
 
Well, you could

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

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
 
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.
 

Similar threads