Why are these P and U file attributes suddenly appearing?

Page 1 of 2 12 LastLast

  1. Posts : 41
    Windows 7
       #1

    Why are these P and U file attributes suddenly appearing?


    All I remember for a long time of using Windows was the usual file attributes of A, R, H, S and others that would appear, but I had apps ready to control those, as I don't like irregularities in my file organisation.

    And then, when I download a zip archive for an app 48 hours ago, I get reports of strange attribute information in my unzipping tool, 7-Zip, and when unzipped, they manifest in Windows 10 as P and U attributes.

    What are these new file attributes? From what I've learned, it's part of OneDrive sharing, and I hear they stand for Pinned and Unpinned (whatever that means), but I don't want anything to do with them, so how can I get rid of them? These attributes seem to be spreading to other files that didn't have them before - I am using an SSD by itself, is it something to do with that?

    Please, Windows 10 may be a service now, but I don't want my personal files to be affected by this, especially when no apps (including Windows) can get rid of them. Can you help me?
      My Computer


  2. Posts : 26,993
    Windows 10 (Pro and Insider Pro)
       #2

    Looks like some new attributs are showing up.

    Pinned and unpinned - some explanations are saying that they prevent or allow files to be purged on low free space status.

    More Superuser



    C:\WINDOWS\system32>attrib /?
    Displays or changes file attributes.

    ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [+O | -O] [+I | -I] [+P | -P] [+U | -U]
    [drive:][path][filename] [/S [/D]] [/L]

    + Sets an attribute.
    - Clears an attribute.
    R Read-only file attribute.
    A Archive file attribute.
    S System file attribute.
    H Hidden file attribute.
    O Offline attribute.
    I Not content indexed file attribute.
    X No scrub file attribute.
    V Integrity attribute.
    P Pinned attribute.
    U Unpinned attribute.
    [drive:][path][filename]
    Specifies a file or files for attrib to process.
    /S Processes matching files in the current folder
    and all subfolders.
    /D Processes folders as well.
    /L Work on the attributes of the Symbolic Link versus
    the target of the Symbolic Link
      My Computers


  3. Posts : 24,665
    10 Home x64 (21H2) (10 Pro on 2nd pc)
       #3

    Appears to be related to offline files. Some discussion here...
    (edit: same link as AndreTen gave earlier)

    ...There are actually more new attributes found in C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um\winnt.h:
    Code:
    FILE_ATTRIBUTE_UNPINNED              = 0x00100000
    FILE_ATTRIBUTE_PINNED                = 0x00080000
    FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS = 0x00400000
    Only the last one is documented at https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx

    ...my guess is that the "Pinned" flag is used to prevent that the file is purged from local storage when running low on disk space. The "Unpinned" attribute, OTOH, seems to be used to indicate that you want to force that the file is not stored locally.I'm currently investigating how these attributes are used by the new "OneDrive Files On Demand" ...
    https://superuser.com/questions/1214...v-pinn/1287315

    ...and here.

    ...Based on this, we have enough information to determine which of the three OneDrive "statuses" a file can be in:
    - online-only
    FILE_ATTRIBUTE_PINNED : False
    FILE_ATTRIBUTE_UNPINNED : True
    FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS : True

    - locally available
    FILE_ATTRIBUTE_PINNED : False
    FILE_ATTRIBUTE_UNPINNED : False
    FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS : False

    - always available
    FILE_ATTRIBUTE_PINNED : True
    FILE_ATTRIBUTE_UNPINNED : False
    FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS : False

    Note that 3 attribute bits are involved, which should allow 8 combinations, but only 3 combinations are used (I would expect that the other 5 are not valid / supported)...
    https://social.technet.microsoft.com...ell?forum=ITCG
      My Computers


  4. Posts : 231
    Pro 20H2
       #4

    1) Some of my files have BOTH P and U. Logically, mutually exclusive.

    2) Some of my files have attribute M, about which I have found not a single reference in the Web.

    Win10 1903
      My Computer


  5. Posts : 958
    Microsoft Windows 10 Home
       #5

    We can try to figure out the mystery 'M' attribute.
    1. In Explorer, Shift+Right-Click on the file & select Copy as path
    2. Open a PowerShell window and type
      Code:
      (gi<Space><paste copied path>).Attributes.Value__
    3. So, for example:
      Code:
      PS C:\...\keith>(gi "C:\Users\keith\Documents\filelist.csv").Attributes.Value__
      32
      PS C:\...\keith>


    Then reply with the returned value.

    Keith
      My Computer


  6. Posts : 26,993
    Windows 10 (Pro and Insider Pro)
       #6

    No need to complicate Keith... Install Treesize free and turn on attributes...

    M attribute is placeholder for file. Easy to find out, as shown in picture below. Or turn them on in File explorer - shows a bit different picture Instead of AM, in file explorer I get ALOM..

    Why are these P and U file attributes suddenly appearing?-image.png
      My Computers


  7. Posts : 958
    Microsoft Windows 10 Home
       #7

    I find 3rd party programs more complicated than a single line of code. And with a little more code, you can learn more. M corresponds to RecallOnDataAccess (0x00400000).

    https://social.technet.microsoft.com...ell?forum=ITCG

    Why are these P and U file attributes suddenly appearing?-screenshot-382-.pngWhy are these P and U file attributes suddenly appearing?-screenshot-381-.png

    Keith
      My Computer


  8. Posts : 231
    Pro 20H2
       #8

    Good work, thank you for it.

    In https://docs.microsoft.com/en-gb/win...bute-constants :
    "not all of its data is on local storage (e.g. it may be sparse with some data still in remote storage)....
    Reading the file... will cause at least some of the file/directory content to be fetched from a remote store."

    Ok in theory. However, sizes of your "M" files shown above all are listed as 1k, which for those particular files (desktop.ini for sure) probably also are their total sizes. So, 1k of data split locally and remotely.
    Anybody think that it's not ridiculous?


    ------------
    Using the same PS command line shown in your screen shot, which gave you names of attributes, I get one numeric value instead.
    Last edited by thename; 21 Jun 2019 at 18:41.
      My Computer


  9. Posts : 958
    Microsoft Windows 10 Home
       #9

    The file size is displayed for informatrion, but if the file is not pinned & hasn't been accessed, that space isn't used.
    Why are these P and U file attributes suddenly appearing?-screenshot-384-.pngWhy are these P and U file attributes suddenly appearing?-screenshot-383-.png

    windows - DIR shows file sizes in parentheses - Super User

    Keith
      My Computer


  10. Posts : 958
    Microsoft Windows 10 Home
       #10

    thename said:
    1) Some of my files have BOTH P and U. Logically, mutually exclusive.
    I only see this applied to desktop.ini files, which are not synced to cloud storage. So it seems this combination of attrubutes flags a file to be excluded from syncing even though it resides in a synced folder.

    Keith
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 03:46.
Find Us




Windows 10 Forums