The Packers and the Pseudo Path \\Desktop\

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
seb-
Senior Member
Senior Member
Posts: 276
Joined: 2011-11-15, 06:14 UTC
Location: DE\BN - only part time TC user after switching to Linux ;)

The Packers and the Pseudo Path \\Desktop\

Post by *seb- »

Not sure if bug or feature.. but kind of annoying ;)
Edit:And sorry for the long long text for this small problem ;)

Today i noticed some weird behaviour when trying to pack a file from my Dekstop to a Zip file into another direcotry on a different Drive.

To easily access my desktop (which i use as a central place to temporarily store anything) with TC, i added a button with CMD cm_OpenDesktop somewhere in the ButtonBar.

That works well, no problems.

But when i then try to select a file and use *ANY* packer (Zip, Tar, or Wipe plugin, i'm sure other Plugins are affected as well) to create the destination file into the other sides active panel, TC timesout with an error saying "Can't open file for Read \\Desktop\file.ext"

I guess the Problem is that the pseudo-path \\Desktop\ which reflects of course the logged-in users desktop folder in documents&settings, is not accessible for the Packer plugins and the built-in packer functions.

Lister Plugins work fine!


A possible workaround is to open any subfolder on desktop, which will navigate to the realpath+subfolder, and then using ".." to go one level up, which then will open the real desktop path and the problem vanishes.

I could also change my button to link to the specific desktop path, but...

wheres the sense in having cm_OpenDesktop then?

I configured my button bar once and redistributed it to different systems using different desktop locations.

There might be also another environment variable which would solve this, but anyway to me this looks like the behaviour is not as designed/intended.

Dont know how it looks like in TC8, but why not spending some minutes to change the behaviour of how cm_OpenDesktop is opening the current users desktop path?

br
seb


PS: selecting a file on \\Desktop\ and clicking my button for notepad++ also results in "file not found"...
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3381
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

Use cd %USERPROFILE%\Desktop instead...
Hoecker sie sind raus!
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Use cd %USERPROFILE%\Desktop instead...
That will only work on locales where the name of the desktop folder is actually "Desktop" - which it is not for all Windows versions/locale - for a Danish Windows XP it is for example "Skrivebord".

Better use cd %$DESKTOP% - this pseudo environment variable is universal for going to the personal part of the Desktop for all (newer) Windows versions.

http://www.ghisler.ch/wiki/index.php/Navigation
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, seb-.

As petermad has given you the universal workaround to achieve your goal nonetheless:
  1. cd %$DESKTOP%
  2. perform the desired action
let me briefly add why the problem exists:

The support for Windows virtual folders like "Desktop", "(My) Documents", "(My) Computer" etc is still pretty limited in Total Commander.

You can e.g. copy and move files from a normal folder to such folders and vice versa from such a virtual folder to a normal folder. Files located in "Desktop" can be viewed inside the internal lister. Using the built-in file compare tool (compare by content) is possible as well.
Yet, other operations like packing and unpacking are not supported, yet.

The reason why T.C. allows you to enter the virtual folders nevertheless, like "Desktop" (\\Desktop) or "Computer" (\\Computer), is
  • because users asked for it
  • some devices only show up inside "Computer" (\\Computer) and this is the only place where you can access such devices from inside Total Commander, too.
Kind regards,
Karl
seb-
Senior Member
Senior Member
Posts: 276
Joined: 2011-11-15, 06:14 UTC
Location: DE\BN - only part time TC user after switching to Linux ;)

Post by *seb- »

cd %$DESKTOP%

seems to be the best solution. Thanks for the hint.

I'd suggest to change cm_OpenDesktop to do the exact same thing ;-)

but cd %$DESKTOP% does the job, if you know it ;)

thanks!
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, seb-.

cd %$DESKTOP% on the one hand and cm_OpenDesktop on the other hand do exactly the slightly different things which they have been designed to do:

cd %$DESKTOP% takes you to your personal desktop folder which is one part out of two which make up the virtual Windows desktop folder.
(Basically, the virtual desktop folder is a combined view which presents the content of the physical folders %userprofile%\desktop and %allusersprofile%\desktop.)
(I know that the folder "desktop" is not called "desktop" in all localized Windows versions. But using the foldername "desktop" was the quickest way of explaining what the virtual folder desktop was.)

cm_OpenDesktop takes you to the virtual Windows desktop folder. I.e. you will be presented the view which holds the content of the two physical folders %userprofile%\desktop and %allusersprofile%\desktop.
(Above apology for using the foldername "desktop" applies here, too.)

If cm_OpenDesktop did the same thing as cd %$DESKTOP%, in this case we would need a new internal command that takes us to the virtual Windows desktop folder.

Kind regards,
Karl
seb-
Senior Member
Senior Member
Posts: 276
Joined: 2011-11-15, 06:14 UTC
Location: DE\BN - only part time TC user after switching to Linux ;)

Post by *seb- »

Whats the use for the virtual desktop folder then?
Just that its shorter? \\Desktop\?
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Just to make the story more complete - you can use cd %$COMMON_DESKTOPDIRECTORY% to go to the common (shared) part of \\Desktop

If you ad up what cd %$DESKTOP% and %$COMMON_DESKTOPDIRECTORY% shows, you get all the files that are located in \\Desktop, but there are some (other virtual) directories like Computer, My Computer, Recycle Bin, Network, My Network Places, Control Panel, Libraries, Documents, User that are not shown with neither cd %$DESKTOP% nor %$COMMON_DESKTOPDIRECTORY% but only in \\Desktop - hence the need for cm_OpenDesktop.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply