Re willsort:
Adding the code provided by the moderator at the very beginning of this program script, if not "%1"=="$" %comspec% /f:on /c %0 $ && goto :eof, indeed enables the function of automatically completing the file name. However, during testing, the strange phenomenon shown in the following figure was discovered.
The condition for the problem to occur is: when entering a file name that is much shorter than the previous one by pressing Ctrl+F or Ctrl+D, there will be remnants of the previous file name after the current file name. If it is shorter each time, more remnants will appear, but it does not affect the correct execution of the program.
In addition, I don't understand the exact meaning of this code. Can the moderator explain it?
Adding the code provided by the moderator at the very beginning of this program script, if not "%1"=="$" %comspec% /f:on /c %0 $ && goto :eof, indeed enables the function of automatically completing the file name. However, during testing, the strange phenomenon shown in the following figure was discovered.
The condition for the problem to occur is: when entering a file name that is much shorter than the previous one by pressing Ctrl+F or Ctrl+D, there will be remnants of the previous file name after the current file name. If it is shorter each time, more remnants will appear, but it does not affect the correct execution of the program.
In addition, I don't understand the exact meaning of this code. Can the moderator explain it?

DigestI
