[8.5b3] Programs starting from left panel vs. right panel

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

[8.5b3] Programs starting from left panel vs. right panel

Post by *Hacker »

1. Run TC with a fresh.ini
2. Navigate from c:\ to c:\right\ in TC's right panel
3. Start notepad.exe from the command line (you must not have saved anything in notepad before)
4. Choose File - Save as... - Notepad suggests to save the file under c:\right\*.txt - correct
5. Cancel and close notepad
6. Navigate from c:\ to c:\left\ in TC's left panel
7. Start notepad.exe from the command line (you must not have saved anything in notepad before)
8. Choose File - Save as... - Notepad suggests to save the file under Documents - incorrect

Is the current dir / start path when running external programs from the command line set differently when started from TC's left vs. right panel?
(Please note I have changed the dir in the left panel before starting notepad so the current dir should be set to c:\left\)

Thanks
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Which Windows version? Here on Windows 7 x64, Notepad.exe always suggests the last save path (where the last file was saved).
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6015
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [8.5b3] Programs starting from left panel vs. right pane

Post by *white »

Hacker wrote:Is the current dir / start path when running external programs from the command line set differently when started from TC's left vs. right panel?
No. Try a different program than notepad, for example:

Code: Select all

cmd /c echo %cd% & pause
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Christian,
Which Windows version?
Windows 7 x64.
Here on Windows 7 x64, Notepad.exe always suggests the last save path (where the last file was saved).
Yes, that's why I stated you must not have saved anything in Notepad before. Ever. (Or perhaps there is a way to clear that "save path history" for Notepad.)

white,
So why is it different with Notepad?

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
white
Power Member
Power Member
Posts: 6015
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Hacker wrote: white,
So why is it different with Notepad?
It isn't.

What happens when you run "Notepad newfile.txt" and create that file?
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

white,
Too late, I already saved something with Notepad, for testing purposes. Can you reproduce my results from the first post?

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
white
Power Member
Power Member
Posts: 6015
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Hacker wrote:white,
Too late, I already saved something with Notepad, for testing purposes. Can you reproduce my results from the first post?
No, the "you must not have saved anything in notepad before" condition is awkward. And I don't have Windows 7 64 bit.

Did you also try left first and then right? Or right and then right again? What made you think it has anything to do with left/right?

Notepad uses comdlg to save files, so it's probably related to comdlg and not notepad. The dialog defaults to Documents if the MRU information does not give a valid result. When you delete the folder where a file was last saved or when you clear the mru list, the (default) Document folder is used. Perhaps when the mru list has never been used before, the current folder is used. Something like that. I think it is a Windows initialization thingy.
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

white,
OK, I renamed the dir Notepad had as its save path and after some further testing, it seems Notepad suggests the save path based on the dir it was launched from - sometimes it suggests the dir it was launched from, sometimes it suggests Documents. It seems that when testing before, by chance I had one type of dirs in the left panel and the other type in the right panel.

Notepad suggests the dir it was started from when I launch it from c:\download\ or c:\download\canon microsd\
However, it suggests Documents when I launch it from c:\download\asdasd\

Funny. But at least it seems an incosistent Notepad behavior, nothing to do with TC as I can reproduce the same behavior when starting Notepad from the console window.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
white
Power Member
Power Member
Posts: 6015
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Hacker wrote:sometimes it suggests the dir it was launched from, sometimes it suggests Documents.
Same here using Windows XP 32bit. It seems to be dependent of whether or not *.txt files are present in the folder.
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

white,
Ahh, I can confirm! Mystery solved! Thank you very much! :D

;)
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply