cd + partially invalid paths
Moderators: Hacker, petermad, Stefan2, white
cd + partially invalid paths
Let's assume that TC is installed in "C:\Program Files\Total Commander". Let's perform some tests:
1) cd "C:\Program Files\Total Commander" -> TC goes into "C:\Program Files\Total Commander".
2) cd "C:\Program Files\Total Commander\NotExistingName1" -> TC goes into "C:\Program Files\Total Commander".
3) cd "C:\Program Files\Total Commander\NotExistingName1\NotExistingName2" -> nothing happens.
So the improvement could be: TC could follow the path until the last existing name - similarly as Ctrl+D menu already does.
This could be useful when dealing with paths to uninstalled applications - we may still want to go to the folder that was containing the uninstalled application.
Regards
1) cd "C:\Program Files\Total Commander" -> TC goes into "C:\Program Files\Total Commander".
2) cd "C:\Program Files\Total Commander\NotExistingName1" -> TC goes into "C:\Program Files\Total Commander".
3) cd "C:\Program Files\Total Commander\NotExistingName1\NotExistingName2" -> nothing happens.
So the improvement could be: TC could follow the path until the last existing name - similarly as Ctrl+D menu already does.
This could be useful when dealing with paths to uninstalled applications - we may still want to go to the folder that was containing the uninstalled application.
Regards
- ghisler(Author)
- Site Admin
- Posts: 50873
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
If TC cannot go to
C:\Program Files\Total Commander\NotExistingName1
it assumes that NotExistingName1 could be a file, so TC goes to
C:\Program Files\Total Commander
and tries to set the cursor on NotExistingName1.
C:\Program Files\Total Commander\NotExistingName1
it assumes that NotExistingName1 could be a file, so TC goes to
C:\Program Files\Total Commander
and tries to set the cursor on NotExistingName1.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
You can do it much easier: if X:\A\B\C\D exists, it is accepted, otherwise you truncate path (X:\A\B\C, X:\A\B etc) until object exists. When you found existing object, there are not so much things to do: if it is a file, you focus it, if it is a folder or archive, you focus or enter it depending on command line options.
- ghisler(Author)
- Site Admin
- Posts: 50873
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
TC already does this when refreshing the current directory, and it doesn't exist any more. However, when you use "cd" to a specific location, I'm not sure that the user wants to check all parents too. Therefore this isn't currently done.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com