OneDrive status column
Moderators: Hacker, petermad, Stefan2, white
OneDrive status column
Hi,
Is it possible to add a "status" column for OneDrive folders (only in cloud, on disk, etc), that's new to the "fall update" of W10?
Is it possible to add a "status" column for OneDrive folders (only in cloud, on disk, etc), that's new to the "fall update" of W10?
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I'm working on that. So far I only found a way to distinguish between files which are available offline, and those which are only online. But I couldn't find a way to detect whether the option was set to always keep a file also offline (filled green circle). There also seems to be no notification from Windows when the status of a file changes.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: OneDrive status column
May I ask very polite, if there are any news regarding the OneDrive Status column?
I saw the info that we can add "IconOverlaysOneDrive=1" in wincmd.ini - but this isn't the same as the status column in Explorer does, right?

I saw the info that we can add "IconOverlaysOneDrive=1" in wincmd.ini - but this isn't the same as the status column in Explorer does, right?
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: OneDrive status column
TC 9.2x is showing what is available to third party programs like TC: it shows a little cloud overlay symbol if a file is remote only. Other data as shown by the Explorer in its separate status column like which file is currently being uploaded or downloaded is not available to third party programs on Windows.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: OneDrive status column
Edit: correction, TC (x64) 9.50beta13 under Win 10 in fact displays a little cloud overlay symbol if a file is remote only.
BTW: if I add the custom column "file is offline" of contents "[=tc.offline]" TC correctly displays "yes" when OneDrive displays the cloud.
Regards TCEcho
I am using TC (x64) 9.50beta13 under Win 10. TC does neither display a status column nor a little cloud overlay symbol if a file is remote only. Any ideas what's going wrong?ghisler(Author) wrote: 2018-09-26, 09:09 UTC TC 9.2x is showing what is available to third party programs like TC: it shows a little cloud overlay symbol if a file is remote only. Other data as shown by the Explorer in its separate status column like which file is currently being uploaded or downloaded is not available to third party programs on Windows.
BTW: if I add the custom column "file is offline" of contents "[=tc.offline]" TC correctly displays "yes" when OneDrive displays the cloud.
Regards TCEcho
Re: OneDrive status column
Good morning 
First of all I would like to say that I'm a big fan of the TC app from more than 20 years. I can't imagine working with Windows without it. Kudos to you Christian Ghisler.
I would like to ask if there is any update regarding this OneDrive's Status column in TC?
Or maybe chance to implement it in the near future?
Best regards,
Greg

First of all I would like to say that I'm a big fan of the TC app from more than 20 years. I can't imagine working with Windows without it. Kudos to you Christian Ghisler.
I would like to ask if there is any update regarding this OneDrive's Status column in TC?
Or maybe chance to implement it in the near future?
Best regards,
Greg
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: OneDrive status column
Did you enable overlay icons in Configuration - Options - Icons? When I do this, I get small cloud icons for OneDrive files which are online only.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: OneDrive status column
Apologies for such a late response from my side.
Yes, I enabled the "Show overlay icons" option, and this is working as expected, but I'm missing the "Status" column showing the current state of the files and even whole folders, as in the File Explorer. I think you know what I mean. Do you think this is something doable? I know you mentioned that OneDrive's API is not clear, not stating how this is made and/or how this can be implemented in third apps. But maybe there were some changes over years in this matter?
Best regards,
Greg
Yes, I enabled the "Show overlay icons" option, and this is working as expected, but I'm missing the "Status" column showing the current state of the files and even whole folders, as in the File Explorer. I think you know what I mean. Do you think this is something doable? I know you mentioned that OneDrive's API is not clear, not stating how this is made and/or how this can be implemented in third apps. But maybe there were some changes over years in this matter?
Best regards,
Greg
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: OneDrive status column
There are no functions to retrieve the other statuses of files, only the "offline only" status can be determined programmatically.
Therefore TC cannot show these other icons the way the Explorer shows them.
Therefore TC cannot show these other icons the way the Explorer shows them.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: OneDrive status column
I understand. Thank you for your answer, Christian. Maybe in the future, Microsoft will release a better OneDrive's API for third parties.
Best regards,
Greg
Best regards,
Greg
Re: OneDrive status column
Image: https://i.postimg.cc/CL8rWtnZ/onedrive.jpgghisler(Author) wrote: 2022-02-11, 15:16 UTC There are no functions to retrieve the other statuses of files, only the "offline only" status can be determined programmatically.
Therefore TC cannot show these other icons the way the Explorer shows them.
Double Commander can distinguish between "sync pending" and "upload finished" state. TC should be able to do the same.
Re: OneDrive status column
Some file attributes meaning:
Example attributes reading:
Example attribute breakdown (for 5248544 [0x00501620]):
Some information:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/ca28ec38-f155-4768-81d6-4bfeb8586fc9
525344 | [0x00080410] | Always Available (Locally available on Disk) |
5248544 | [0x00501620] | Online Available (Only on OneDrive) |
ReparsePoint | Locally Available |
Example attributes reading:
Code: Select all
# OneDriveContentsStatus.ps1
Get-ChildItem -path $env:OneDrive -recurse -force | ForEach-Object {
Write-Host $_.Attributes -f Red -no
if ($_.Attributes -eq 5248544) {Write-Host ' Available when online ' -f Cyan -no}
if ($_.Attributes -eq 525344) {Write-Host ' Always available on this device ' -f Green -no}
if ($_.Attributes -match 'ReparsePoint') {Write-Host ' Available on this device ' -f Yellow -no}
Write-Host $_.FullName
}
pause
# Note: when the path is $env:OneDrive (the entire cloud), the output can be huge,
# so using a certain subfolder with limited test contents would be pretty reasonable.
Code: Select all
0x00501620
# 0x00500000
0x00400000 - FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS
0x00100000 - FILE_ATTRIBUTE_UNPINNED
# 0x00001000
0x00001000 - FILE_ATTRIBUTE_OFFLINE
# 0x00000600
0x00000400 - FILE_ATTRIBUTE_REPARSE_POINT
0x00000200 - FILE_ATTRIBUTE_SPARSE_FILE
# 0x00000020
0x00000020 - FILE_ATTRIBUTE_ARCHIVE
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/ca28ec38-f155-4768-81d6-4bfeb8586fc9
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10/15
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: OneDrive status column
I'm currently using the following three:
FILE_ATTRIBUTE_RECALL_ON_OPEN=0x40000
FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS=0x400000
-> cloud overlay
FILE_ATTRIBUTE_PINNED=0x80000
-> checkmark overlay
Using FILE_ATTRIBUTE_REPARSE_POINT is a bad idea because it is also set for real file system links.
FILE_ATTRIBUTE_RECALL_ON_OPEN=0x40000
FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS=0x400000
-> cloud overlay
FILE_ATTRIBUTE_PINNED=0x80000
-> checkmark overlay
Using FILE_ATTRIBUTE_REPARSE_POINT is a bad idea because it is also set for real file system links.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: OneDrive status column
according to some AI the logic should be (Python)
Code: Select all
if attrs & FILE_ATTRIBUTE_OFFLINE:
print("File is not fully downloaded (available online only).")
elif attrs & FILE_ATTRIBUTE_RECALL_ON_OPEN:
print("File will be downloaded on open.")
elif attrs & FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS:
print("File is partially downloaded.")
else:
print("File is fully available.")
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: OneDrive status column
FILE_ATTRIBUTE_OFFLINE is used for files on Windows SMB shares. Microsoft writes about it "The data of a file is not available immediately. This attribute indicates that the file data is physically moved to offline storage. This attribute is used by Remote Storage, which is the hierarchical storage management software. Applications should not arbitrarily change this attribute.". It seems to be used for data which isn't immediately available on the server, e.g. on a tape drive.
https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants
I didn't see it used for OneDrive.
https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants
I didn't see it used for OneDrive.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com