File Explorer vs TC in OneDrive

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
esiek
New Member
New Member
Posts: 1
Joined: 2022-02-02, 23:03 UTC

File Explorer vs TC in OneDrive

Post by *esiek »

Hello,
I’ve encountered strange issue running W11 and TC10 (the same on other versions TC as well).
When opening an office file in Windows file explorer, the file opens with autosave feature on and it is available online for editing also for other teammates. When opening the same file using TC (from OneDrive folder) I have autosave feature turned off and work as in offline mode -> no access by teammates, I cannot share the file from Office app as the message is that I must upload file first to OneDrive.

It looks like TC is opening the file in different way than Windows File Explorer. I’m pretty sure that on my another computer (don’t have currently access to), Total Commander opens those files in online mode as well. So, I believe there need to be some option in TC config which can be changed?

Thank you in advance for any reply.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: File Explorer vs TC in OneDrive

Post by *ghisler(Author) »

Total Commander uses a standard Windows function (ShellExecuteEx) to open files. You can also use the Explorer method by right clicking on the file and choosing the bold menu item (usually the file name, may be also "open" or something similar).

If this makes no difference, you should check whether you are running Total Commander with higher user rights - Office programs don't like to be launched with higher rights and can cause all kinds of troubles.

1. Right click on the icon by which you start Total Commander
2. If it is the icon in the task bar at the bottom, you need to right
click AGAIN, this time on the menu item "Total Commander"
3. Click on "Properties"
4. Click on "Advanced" and uncheck "Run as Administrator" if it's
checked
5. Go to the "Compatibility" tab and also uncheck "Run as Administrator"
if it's checked
6. Close and re-open Total Commander
Author of Total Commander
https://www.ghisler.com
vincman
Junior Member
Junior Member
Posts: 3
Joined: 2023-01-31, 08:41 UTC

Re: File Explorer vs TC in OneDrive

Post by *vincman »

I am wondering if the problem experienced by @esiek has to do with path aliases. I am having the same issue (i.e., the AutoSave is off) when opening a synced MS Office file (e.g., *.docx) from a path that is an alias of the OneDrive folder. I'm observing the following behavior. When I navigate to c:\Users\<username>\OneDrive and open a Word either in Explorer or by the default action within TC, the AutoSave feature is On and the file automatically and instantaneously syncs to OneDrive after a change as desired. However, when I navigate to the same file via an alias of the same location, whether it be via a directory junction (created via mklink /J) or in the form of a mapped drive (created via net use), and open it, the AutoSave feature is Off. This behavior is not specific to TC, the same happens when the file is opened in the alias path directly within Explorer. Apparently, the alias paths do not get treated the same way by the MS Office apps.

@ghisler(Author) Although I suspect this is a very niche issue that affects only a small subset of users, I'm nonetheless wondering if there is a way to work around this within TC. Is there one currently? Or could a feature perhaps be implemented? One idea that comes to mind would be to add to TC the option for TC to resolve any alias paths (or perhaps only user-specified paths) prior to executing a file. Given the relevance of OneDrive in the corporate world, ideally TC would have the option to automatically detect that a path resolves to a OneDrive folder (there could be multiple) and resolve the path automatically. This would make TC superior to Explorer even when interacting with Microsoft's own OneDrive, which would be very neat. Is that at all possible?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: File Explorer vs TC in OneDrive

Post by *ghisler(Author) »

Have you tried opening the file via a .lnk file (e.g. file.docx.lnk) instead of a junction? When you use a junction to the folder and open a file from there and save it, Windows will notfiy listening apps about the change in the link and not the original folder.
Author of Total Commander
https://www.ghisler.com
vincman
Junior Member
Junior Member
Posts: 3
Joined: 2023-01-31, 08:41 UTC

Re: File Explorer vs TC in OneDrive

Post by *vincman »

Thanks for the idea. Unfortunately, I do not believe using shortcuts (*.lnk files) is a workable solution to what I was describing. There are simply too many files for this to be achievable.

Let me describe the logic that I was trying to convey.

SETUP

The following three objects point to the same location in the file system:

Actual location: c:\Users\someuser\OneDrive_dir_with_long_and_nasty_name
Alias folder: c:\Users\someuser\OD
Alias drive: d

Both the alias folder and the alias drive point to the actual location, which is the location of the OneDrive folder, i.e., c:\Users\someuser\OneDrive_dir_with_long_and_nasty_name. The alias folder is a directory junction (created with mklink /J) and alias drive is mapped to the same location by being mapped to \\localhost\c$\Users\someuser\OneDrive_dir_with_long_and_nasty_name.

MOTIVATION

The reason for this setup is to have a short and special-characters-free access to the files within the OneDrive folder. The probelm is the name of the OneDrive folder, which is inconveniently long name and more importantly has nasty non-ASCII characters in the name, which causes trouble in certain programs. The name of the OneDrive folder is set up by the OneDrive client and cannot be changed without admin privileges.

GOAL

The goal is to be able to open all of the office files (there are many) within OneDrive from the aliases (either OD or d:\) by executing them and to have AutoSave work (i.e., be enabled) in the same way that it would be if the identical files were open by navigating to OneDrive_dir_with_long_and_nasty_name and executing it them from there. In the latter case, the listening OneDrive client picks up on the location of the executed file being within the OneDrive folder and enables AutoSave automatically. In the former case (i.e., when accessed via the aliases), the client does not realize it is the same location and since it thinks the files are local files AutoSave does not work.

SOLUTION

In the ideal world, one could tell the client that the aliases point to the same location, but that does not seem possible. Alternatively, if the junction OD were resolved to the target location by the executing program (TC in this case) just prior execution, the listening OneDrive client would register it being in OneDrive and the AutoSave would function. This resolution of symbolic paths into their targets prior to execution is the feature I was inquiring about. Is that something that could be added to TC?

Thanks for your answer!
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: File Explorer vs TC in OneDrive

Post by *Usher »

Have tried to use SUBST command?

Code: Select all

subst D: \\localhost\c$\Users\someuser\OneDrive_dir_with_long_and_nasty_name
Andrzej P. Wozniak
Polish subforum moderator
vincman
Junior Member
Junior Member
Posts: 3
Joined: 2023-01-31, 08:41 UTC

Re: File Explorer vs TC in OneDrive

Post by *vincman »

Thanks for the suggestion. Unfortunately this does not seem to make a positive difference. When I open a file from a drive mapped this way, whether it is mapped via

Code: Select all

subst D: \\localhost\c$\Users\someuser\OneDrive_dir_with_long_and_nasty_name
or via

Code: Select all

subst D: c:\Users\someuser\OneDrive_dir_with_long_and_nasty_name
the OneDrive client does not seem to pick up on it and the AutoSave functions remains off.
Post Reply