OneDrive-directories started showing as links

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
henniegl
Junior Member
Junior Member
Posts: 6
Joined: 2013-09-05, 12:02 UTC

OneDrive-directories started showing as links

Post by *henniegl »

I am not an expert on this, but my problem is probably related to this: OneDrive link folder offline status not correct


I use Onedrive with all files also stored locally. Onedrive had a hiccup and seemed to have switched on Files-on-Demand automatically. No idea how that happened, it wasn't me. I noticed because all the OD-directories in TotalCMD started showing as links. Same in File Explorer.
After I switched off Files-on-Demand, it took about a minute for File Explorer to switch back all directories to normal status. There was no significant download going on, I guess all files were still there locally.

Now TotalCmd switched back most directories to normal, but it still has a few Onedrive directories that it keeps marking as LNK. File Explorer and a command line Dir show everything as normal local directories. Restarting TotalCMD and a reboot did not help. It seems like this data is stored in some cache?
How can I force TotalCmd to refresh this?
henniegl
Junior Member
Junior Member
Posts: 6
Joined: 2013-09-05, 12:02 UTC

Post by *henniegl »

Hm, checking a bit further I must add that the problem is most likely not with TotalCMD but with my Onedrive directory being messed up. Some examples:
- Using Totalcmd, if I doubleclick on a .jpg file in one of the <LNK> directories, I get a message that the file cannot be found. Which is strange because it does show the file. If I do this in another directory it brings up my pic viewer.
- If I use File explorer, then the directory is shown as normal (not LNK). But when it shows the file, it will not show the preview, just a generic JPG icon. I can double-click to open the file.
- Only if I copy the file to another directory, then File Explorer wil show the preview as well.

It is still strange that TotalCMD shows the directories as <LNK> where File explorer does not, but both seem to agree there are issues with this Onedrive directory so I can well imagine that you are not really interested to start digging in my problem :)

Thanks for reading, and I will continue my search with "How to fix a corrupt Onedrive".
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Explorer doesn't know (or at least doesn't show) linked directories by default. A third-party extension (or a real file manager like TC) is required to view junctions and other NTFS features as such instead of as regular directories.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
henniegl
Junior Member
Junior Member
Posts: 6
Joined: 2013-09-05, 12:02 UTC

Post by *henniegl »

I strongly prefer TC but Windows has some options as well.

My version of Explorer (latest Win 10) shows a little arrow on the directory icon if it is a <LNK>.
Also a good way to check is to use a cmd window. The DIR command will show you the junction and where it leads to.
hhgygy
Junior Member
Junior Member
Posts: 3
Joined: 2018-04-14, 09:47 UTC

TC showing folders as links under OneDrive

Post by *hhgygy »

Hi there just registered to this forum because I am configuring a brand new laptop with Windows 10 on it and it seems TC behaves differently on W10.
I have a OneDrive folder and I want to do copying and deleting things there but I cannot because it shows folders as shortcuts or links.
On windows 7 these folders are working fine.
Is there a setting for this?
Thank you
hhgygy
Junior Member
Junior Member
Posts: 3
Joined: 2018-04-14, 09:47 UTC

Post by *hhgygy »

Oops, I just opened a new thread and I see others have the same issue
Installing a brand new laptop with Windows 10 on it and I also have the same issue
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Even though the folders with Windows 10 are shown as LNK folders you can still go into the folders and copy files to them: See http://madsenworld.dk/tcmd/onedrive.png
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
henniegl
Junior Member
Junior Member
Posts: 6
Joined: 2013-09-05, 12:02 UTC

Post by *henniegl »

SOLUTION: I have been able to fix the problem. It was caused by OD but I will document it here in case anyone encounters the same and ends up here.

As mentioned, it all started when OD had for some unknown reason switched to Files-on-Demand. When I switched it off again, I was left with a large number of <LNK> files. It turned out that some 20.000 files and directories had their L attribute set for "reparse point". You can find them with:
dir /s /al d:\Onedrive

And you can fix it with Powershell:
ForEach ($file in Get-ChildItem "d:\OneDrive" -recurse -force ) { fsutil reparsepoint delete $file.Fullname }

As far as I can see now, this solved all my problems. But if anyone is going to copy this, you should be aware this is an extremely dirty solution. Proceed at your own risk.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's not a bug: when you use files-on-demand, directories in the Onedrive folder are actually special file system links! It seems that's how Onedrive handles on demand internally.
Author of Total Commander
https://www.ghisler.com
xt48
Junior Member
Junior Member
Posts: 16
Joined: 2012-10-28, 21:19 UTC

Post by *xt48 »

I encountered the same problem and could "fix" it by turning off files on demand. However, as SSD storage is expensive and thus limited (and no, I can not fit a secondary hdd into my notebook, there is just no space for it), I very much liked this on demand option.

Would be great, if we could have some kind of plugin / option to let TC handle these links as normal files.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC 9.12 correctly handles files on demand, it just shows these link overlays for folders, because Windows is reporting them as links. But you can safely ignore them.
Author of Total Commander
https://www.ghisler.com
xt48
Junior Member
Junior Member
Posts: 16
Joined: 2012-10-28, 21:19 UTC

Post by *xt48 »

That is great. Thank you very much. Time to update... :)
Post Reply