Problem with Command Line

English support forum

Moderators: Stefan2, Hacker, petermad

Post Reply
richardw
Junior Member
Junior Member
Posts: 26
Joined: 2010-07-29, 19:20 UTC
Location: British Columbia, Canada

Problem with Command Line

Post by *richardw »

Hello everyone
I'm having a problem with the command line. I have a batch file that I often use, called dr.bat. But every time I try to run it from the command line, when I enter "dr", the command line brings up "Dr Smith.txt", which I suppose it finds in the command line history.

How do I remove "Dr Smith.txt" from my command line history? I've tried Shift + DEL, that doesn't seem to work.

Is there a way to delete the entire command line history? That would be equally useful.

Thanks.
Registered Total Commander user (and loyal supporter) since 1997
User avatar
Mjolnir
Member
Member
Posts: 137
Joined: 2005-10-08, 21:03 UTC

Re: Problem with Command Line

Post by *Mjolnir »

There may be an simpler method, but you can delete the [Command line history] content from your %COMMANDER_INI% file & reload TC
Longue vie a TC... depuis Win 3.0x !!!
richardw
Junior Member
Junior Member
Posts: 26
Joined: 2010-07-29, 19:20 UTC
Location: British Columbia, Canada

Re: Problem with Command Line

Post by *richardw »

Thank you, yes, I though of that. I looked in my WINCMD.INI file, and there is a section called "[Search Text]", which contains 20 lines, numbered 0 to 19. (In my case, the config file is called WINCMD.INI. Is yours called COMMANDER.INI?)

From my wincmd.ini file:

[SearchText]
0=fogle
1=mileage
2=kilometre
3=dr smith
etc.

(notice that entry 3 is "dr smith", not "Dr Smith.txt"

I also found a section called [Command line history]:

[Command line history]
0=dr Smith.txt
1=dr
2=dir > x
3=dir > 2025IncomeTax.txt

There is a file called "Dr Smith.txt" on my desktop. Is it possible the Command Line is finding that file, and displaying its filename on the command line?

I don't really want to go editing the WINCMD.INI file unless I really know it's safe to do so. Is there a safe method? What would be the process?

Thanks.
Last edited by richardw on 2026-05-25, 20:16 UTC, edited 2 times in total.
Registered Total Commander user (and loyal supporter) since 1997
richardw
Junior Member
Junior Member
Posts: 26
Joined: 2010-07-29, 19:20 UTC
Location: British Columbia, Canada

Re: Problem with Command Line

Post by *richardw »

Ok, I think I've figured out what's happening.

If I go to my "c:\Users\Richard\Desktop\" folder in Total Commander, and then type "dr" on the command line, it finds the file "Dr Smith.txt" in the Desktop folder, and displays its filename in the command line. If I go to a different folder and type "dr" in the command line, that doesn't happen.

Weird. Is it supposed to do that? Or, have I found a bug? :-)
Registered Total Commander user (and loyal supporter) since 1997
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3978
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: Problem with Command Line

Post by *sqa_wizard »

Well, this is by design.
It is configured by: Configuration - Options - Operation: [x] Auto-append suggested name

Just untick the option to prevent it.
#5767 Personal license
richardw
Junior Member
Junior Member
Posts: 26
Joined: 2010-07-29, 19:20 UTC
Location: British Columbia, Canada

Re: Problem with Command Line

Post by *richardw »

Thanks! I'll try that.

UPDATE: I just tried that, and it works just as you suggested. Thanks.
Registered Total Commander user (and loyal supporter) since 1997
Post Reply