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.


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?


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


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.

  • 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 Jul 29 '14 at 15:50
  • Tried this, but this does nothing when I type a few letters of the program name – 576i Aug 6 '14 at 6:52

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


  • Welcome to Super User! Please read the question again carefully. Your answer does not answer the original question. – DavidPostill Nov 11 '16 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.