Copy from desktop -> Error copying files

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
gbo
Senior Member
Senior Member
Posts: 329
Joined: 2005-03-31, 19:58 UTC
Location: Lausanne (Switzerland)

Copy from desktop -> Error copying files

Post by *gbo »

I noticed this strange behaviour on my PC and was wondering if someone knows why it happens (this is quite new probably since 6.54Beta although I am not sure it is related to TC).

When I copy/move from the desktop in TC's pane to somewhere else or vice versa I get this error message (Error copying files), today I noticed that it happens only if the desktop was called through this shortcut (\\).

I put a video as I guess my explainations are not very clear.

(Desktop = Bureau in french)

http://mesphotos.fontismedia.com/tc/desktop_issue.sqx (100 KB) right-click

http://mesphotos.fontismedia.com/tc/desktop_issue.zip (1MB)

TIA
Gil
Licence #17346

90% of coding is debugging. The other 10% is writing bugs.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48096
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Copy from/to the desktop is done via OLE2. TC just reports an error if it gets an error back from the OLE2 functions. It's possible that you have a shell extension which crashes the OLE2 subsystem when calling these functions from TC.

Does it work when you use Ctrl+C Tab Ctrl+V? Does it work when you use the right click context menu?
Author of Total Commander
https://www.ghisler.com
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

Try do drag & drop from desktop to pane. What do you get ?

I have the same problems but when using plugins with files on desktop. When I put your sqx archive on the desktop I can copy it, but I can not enter it (double clik opens associated application) and I can not use "Unpack files" ("Error in archive")


2 Ghisler

Why do u use OLE2 for desktop files. Can't you find real locations of this Virtual Folder and use that path instead ? In the background, transparent, so nobody knows.....
Habemus majkam!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48096
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2majkinetor !
Unfortunately not - the desktop is a virtual folder which takes files from multiple locations, usually
Documents and Settings\<username>\Desktop
and
Documents and Settings\All Users\Desktop

Unfortunately there seems to be no way to find out which file is in which of these locations...
Author of Total Commander
https://www.ghisler.com
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

You can't be serious ?

Unfortunately there seems to be no way to find out which file is in which of these locations...
This is not true. I will send you the API function when I get home.
Habemus majkam!
User avatar
gbo
Senior Member
Senior Member
Posts: 329
Joined: 2005-03-31, 19:58 UTC
Location: Lausanne (Switzerland)

Post by *gbo »

Sorry for the late reply
ghisler(Author) wrote:Copy from/to the desktop is done via OLE2. TC just reports an error if it gets an error back from the OLE2 functions. It's possible that you have a shell extension which crashes the OLE2 subsystem when calling these functions from TC.
How can I know which shell extension crashes OLE2 if any ? I generate a report with ShellExView do you have any idea which one entry I should try to disable ?
http://mesphotos.fontismedia.com/tc/shexview_report.html
ghisler(Author) wrote: Does it work when you use Ctrl+C Tab Ctrl+V? Does it work when you use the right click context menu?
It seems to work with Ctrl+C Ctrl+V and now I can copy again without error message but I still cannot rename. Weird isn't it ?
majkinetor ! wrote: Try do drag & drop from desktop to pane. What do you get ?
I tried that during the test without success (same error message).
Gil
Licence #17346

90% of coding is debugging. The other 10% is writing bugs.
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

Disable them all for the start....
Habemus majkam!
User avatar
gbo
Senior Member
Senior Member
Posts: 329
Joined: 2005-03-31, 19:58 UTC
Location: Lausanne (Switzerland)

Post by *gbo »

majkinetor ! wrote:Disable them all for the start....
I disable them all and reboot. I still get the same error message. CTRL+C CTRL+V works but this time it didn't resolve the issue. I still cannot copy move rename... with TC.

So it seems that shell extensions are not the cause of the problem, other suggestions? How can I detect if OLE32 has crashed and what has made it crashed?

The workaround is to go to the real path but I am just curious to know what can be the cause of this behaviour.
Gil
Licence #17346

90% of coding is debugging. The other 10% is writing bugs.
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

This is TC's failure !
You can't do anything about that.

You can only create shortcut script to transmit you to real folder on hot key or in the start menu
Habemus majkam!
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

ghisler(Author) wrote:2majkinetor !
Unfortunately not - the desktop is a virtual folder which takes files from multiple locations, usually
Documents and Settings\<username>\Desktop
and
Documents and Settings\All Users\Desktop

Unfortunately there seems to be no way to find out which file is in which of these locations...
Wouldn't this be a simple matter of checking those 2 locations before doing a file operation? I have since stopped using \\Desktop due to its complete inability to do anything except for change to another directory. And after changing directory TC can't find its way back to the desktop the "path" is irrevocably corrupted.

And when utilizing a locked Tab on C:\Docs\<UserName>\Desktop\ you lose out on any shortcuts/files that happen to be located in AllUsers, as well as
My Documents\
My Computer\
Network\
Internet Explorer\
Recycle Bin\
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

2 Ghisler

The function you need is:

SHGetPathFromIDList (IN pidl, OUT str);

PIDL, is used to identify objects in the Shell namespace.
str will contain path after return.

And if anything goes wrong (and in your case it always do:) ), just check in 2 mentioned folders....

I have did this in my console app GuiBox.rar (~45K). Download the app, put some file on the desktop, open console and type:

Code: Select all

guibox /F dir - -
Select the file on the desktop and you will get its path on console output.
Last edited by majkinetor ! on 2006-02-03, 21:45 UTC, edited 3 times in total.
Habemus majkam!
User avatar
petermad
Power Member
Power Member
Posts: 14814
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Oh oh :!: :roll:
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

The desktop as a virtual folder may contain more than just files and directories from common and user desktop directory. It contains other virtual folders. Some of them may be also virtual folders which cannot be resolved to physical directories.

Conclusion: This is not a technicial problem but needs a well-founded UI design.
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

This is not a technicial problem but needs a well-founded UI design
What needs to be so well-founded ?
str will contain null if Virtual Folder is selected and path in other cases. If some operation is requested on virtual object (str==null), just skip it...

If somebody select "recycle bin" for packing operation along with some real file you have 2 solutions: first, skip this virtual object, and second - enter it and try too see if it contains some real files by it self and try to pack those files and put them in root of the folder named the same as virtual.

Of course, the first solution will be enough cause who needs second functionality (it is also error proned, imagine packing whole recycle bin) !

So there is acctually nothing there, don't rise false alarms. Just few simple lines of code...
Habemus majkam!
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2majkinetor !
What needs to be so well-founded ?
I know things look easy from a programmer's point of view.
Post Reply