If I create a file named ~abc.tmp and then try to use Command Prompt's character completion feature (usually TAB), it doesn't behave the same way as normal characters:

  • If I type ~ and press TAB, it "completes" the file name incorrectly to ~"~abc.tmp".
  • If I type ~a and press TAB, it fails to complete the file name.

Is there something special about the ~ character that I'm not aware of?

(I know that the 8.3 variants of long file names contain a ~ at the end, but I'm talking about ~ at the start.)

  • 2
    I did the same as you and got the similar results, but that I noticed that repeated Tab presses steps through all the files in the directory, and ~a Tab found all files beginning with a. In all cases the typed ~ was retained, so it never yielded a valid file name. All a bit strange. – AFH Oct 23 '17 at 10:06

The tilde prefix on a temporary item is commonly created by Microsoft applications.

Windows Desktop applications, such as Write, and multiple document interface (MDI) applications, such as Excel, create temporary files to handle necessary user editing.


| improve this answer | |
  • 2
    This doesn't actually answer the question that was asked. The question was asking about a specific behaviour, not if random programs use it to denote temporary files. – Mokubai Oct 23 '17 at 9:11
  • What Mokubai said is correct - this does not answer my question - but it is quite interesting nevertheless; therefore I'll upvote it but I won't mark it as the accepted answer. – DodgyCodeException Oct 23 '17 at 9:34
  • Apologies - I did misread the question. – Robbie W. Oct 23 '17 at 9:38
  • Just playing around with this and looks like a few other special characters (comma, backtick, semi-colon) have a similar effect - leaving the special character but cycle through files. A backslash will begin autocompleting for C:\ – Robbie W. Oct 23 '17 at 9:40

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.