Is there is a way to open very long name file from command Prompt in easy way ? rather than

start fileName.type

  • 1
    If you're talking the Windows command prompt, press the TAB button and it'll scroll through the autopopulated fields for you as well. so it you type start the space and then fil and then press tab, it'll generate the next closest file or folder name perhaps. I thought you were talking Linux terminal ans not Windows command prompt. Jan 2, 2016 at 8:05
  • @LMFAO_A_JOKE haha i forget to TAB although i know it.. thanx anyway
    – Error
    Jan 2, 2016 at 9:04
  • @Error : Please specify which shell you are using. If you just tag your question with shell, it means POSIX shell, and I don't think that you seriously want to run a POSIX shell in a terminal. Oct 28, 2021 at 9:07

1 Answer 1


Turn on auto-complete in Windows command prompt

If you are a Windows power user who frequently needs to use the command prompt regularly, then you find it useful to turn on auto-complete in command prompt. If you want to make the change permanent, you will have to edit the Windows Registry.

File name completion and folder name completion are quick-search features of the Windows command processor or cmd.exe. Auto-complete for CMD.exe is not enabled by default in Windows – you have to enable it.

If auto-complete in Windows command prompt with the Tab key is not already enabled by default in the version of Windows that you are using, you can activate auto-complete permanently or for the current session only by following these instructions.

Activate auto-complete in CMD temporarily

To activate auto-complete in CMD for the current user for the current command session, open Run box, type cmd /f and press Enter. The /f switch, enables or disables file and directory name completion characters.

Now press Ctrl+D to complete the folder name or Ctrl+F to complete a file name. Keep pressing this key combination and see the file names change.

To deactivate automatic complete, type cmd /f:off .

Turn on auto-complete in CMD permanently

To enable auto-complete permanently in command prompt, run regedit to open the Registry Editor, and navigate to the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor

You will have to edit the CompletionChar value. The default is 40 in Hexadecimal. Set the value of REG_DWORD to 9. This will enable folder name completion.

Next, double-click on PathCompletionChar and change its value to 9.

This will set the Tab key as the control character.

If you want to use the same control characters that you use for a single command session as mentioned in the first part of this post, then set the values as follows:

  • 4 for Ctrl+D
  • 6 for Ctrl+F

The file name auto-completion feature will work on folders too, because Windows will search for the complete path and match against both file and folder names.

Source: Turn on Auto-Complete in Windows Command Prompt

  • without using GUI
    – Error
    Jan 2, 2016 at 7:44
  • I changed the answer so that it uses the Tab key on the keyboard instead of drag and dropping the file/folder icon from the Windows Explorer GUI.
    – karel
    Jan 2, 2016 at 8:09
  • 1
    But why do you have to do this? Autocomplete was already enabled by default. Just press tab
    – phuclv
    Jan 2, 2016 at 9:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .