How to autocomplete filename in your path on the command line when in a different directory in windows7

5

1

on the windows command line I can autocomplete any filename/subdirectory by typing a few letters and then pressing Tab. Is there a way to extend this to anything that is in my PATH.

Example:

In my path I have the program verylongfilename.exe

In a command window that is currently in c:\temp I can type verylongfilename.exe to run the program.

If I put verylongfilename.exe in c:\temp, I can type very and then press tab to autocomplete. If verylongfilename.exe is in a different directory within the path, I always have to type the file name completely.

Any way around this without installing third party tools?

576i

Posted 2013-11-26T09:51:00.250

Reputation: 363

Answers

3

From a CMD prompt or the run box, type "powershell" to give you what you're wanting.

pcunite

Posted 2013-11-26T09:51:00.250

Reputation: 1 126

0

Please use this command

cmd /f

which activates autofill.

Then type in atleast one letter of the file (or) folder name,

Then use Ctrl+F to autofill , if there more than one file (or) folder name which starts with the same letter,Then use Ctrl+F to cycle through the list.

Another choice is to drag and drop the file to cmd window, to get the entire path of the field.

user3659473

Posted 2013-11-26T09:51:00.250

Reputation: 11

What? Are you talking about when you start the Command Prompt? And how does it know what the user is looking for, if it searches every directory? – Canadian Luke – 2014-07-29T15:50:52.900

Tried this, but this does nothing when I type a few letters of the program name – 576i – 2014-08-06T06:52:01.693

-2

doing cmd /? at the bottom of the help screen explains:

If completion is enabled with the /F:ON switch

Try that

I Just tried it from an open command console and it didn't work However if you click the Start Icon then search for CMD /F:ON it brings up a command window with completion enabled as the first poster explains

Cheers

ErickP

Posted 2013-11-26T09:51:00.250

Reputation: 1

Welcome to Super User! Please read the question again carefully. Your answer does not answer the original question. – DavidPostill – 2016-11-11T09:21:06.663