AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Zeichen für Datei-Attribute

Ein Thema von Amateurprofi · begonnen am 4. Aug 2024 · letzter Beitrag vom 6. Aug 2024
Antwort Antwort
Amateurprofi

Registriert seit: 17. Nov 2005
Ort: Hamburg
1.087 Beiträge
 
Delphi XE2 Professional
 
#1

Zeichen für Datei-Attribute

  Alt 4. Aug 2024, 02:59
Gibt es eine Funktion, die für ein Datei-Attribut den/die Buchstaben/Zeichen liefert, die Windows für dieses Attribut verwendet.
Für die gängigen Attribute sind die mir bekannt, aber für einige bin ich nicht fündig geworden.
Ich weiß, dass für einige (viele) Werte keine Konstanten definiert sind.
Die Frage ist, was zum Beispiel im Explorer angezeigt wird, wenn eine Datei solche Attribute hat.
Könnte ich vielleicht herausfinden, indem ich für eine Datei diese Attribute setze.
Allein: Wollen hätte ich gern gewollt, aber dürfen hab ich mich nicht getraut.

In der nachstehenden Tabelle sind die mir nicht bekannten Zeichen = '?' gesetzt - um die geht es mir.

Code:
   FileAttributes:Array[0..31] of TFileAttribute=
      ((Bit:0; Attribute:1;         Text:'R'; LongText:'ReadOnly')
      ,(Bit:1; Attribute:2;         Text:'H'; LongText:'Hidden')
      ,(Bit:2; Attribute:4;         Text:'S'; LongText:'System')
      ,(Bit:3; Attribute:8;         Text:'?'; LongText:'Unknown')
      ,(Bit:4; Attribute:16;        Text:'D'; LongText:'Directory')
      ,(Bit:5; Attribute:32;        Text:'A'; LongText:'Archive')
      ,(Bit:6; Attribute:64;        Text:'?'; LongText:'FutureUse')
      ,(Bit:7; Attribute:128;       Text:'N'; LongText:'Normal')
      ,(Bit:8; Attribute:256;       Text:'T'; LongText:'Temporary')
      ,(Bit:9; Attribute:512;       Text:'P'; LongText:'SparseFile')
      ,(Bit:10; Attribute:1024;      Text:'?'; LongText:'ReparsePoint')
      ,(Bit:11; Attribute:2048;      Text:'C'; LongText:'Compressed')
      ,(Bit:12; Attribute:4096;      Text:'?'; LongText:'OffLine')
      ,(Bit:13; Attribute:8192;      Text:'?'; LongText:'NotContentIndexed')
      ,(Bit:14; Attribute:16384;     Text:'E'; LongText:'Encrypted')
      ,(Bit:15; Attribute:32768;     Text:'?'; LongText:'IntegrityStream')
      ,(Bit:16; Attribute:65536;     Text:'?'; LongText:'Virtual')
      ,(Bit:17; Attribute:131072;    Text:'?'; LongText:'NoScrubData')
      ,(Bit:18; Attribute:262144;    Text:'?'; LongText:'RecallOnOpen')  //EA
      ,(Bit:19; Attribute:524288;    Text:'?'; LongText:'Pinned')
      ,(Bit:20; Attribute:1048576;   Text:'?'; LongText:'Unpinned')
      ,(Bit:21; Attribute:2097152;   Text:'?'; LongText:'Unknown')
      ,(Bit:22; Attribute:4194304;   Text:'?'; LongText:'RecallOnDataAccess')
      ,(Bit:23; Attribute:8388608;   Text:'?'; LongText:'Unknown')
      ,(Bit:24; Attribute:16777216;  Text:'?'; LongText:'Unknown')
      ,(Bit:25; Attribute:33554432;  Text:'?'; LongText:'Unknown')
      ,(Bit:26; Attribute:67108864;  Text:'?'; LongText:'Unknown')
      ,(Bit:27; Attribute:134217728; Text:'?'; LongText:'Unknown')
      ,(Bit:28; Attribute:268435456; Text:'?'; LongText:'Unknown')
      ,(Bit:29; Attribute:536870912; Text:'?'; LongText:'Unknown')
      ,(Bit:30; Attribute:1073741824; Text:'?'; LongText:'Unknown')
      ,(Bit:31; Attribute:2147483648; Text:'?'; LongText:'Unknown'));
Gruß, Klaus
Die Titanic wurde von Profis gebaut,
die Arche Noah von einem Amateur.
... Und dieser Beitrag vom Amateurprofi....
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
389 Beiträge
 
#2

AW: Zeichen für Datei-Attribute

  Alt 4. Aug 2024, 08:28
Hi,

Zitat:
Is there a function that returns the letter/characters that Windows uses for a file attribute?
I don't recall seeing such thing.

One thing though, where did you get these letters from ?
I mean this part might be wrong, ( i think !! )
Code:
     
      ,(Bit:9; Attribute:512;      Text:'P'; LongText:'SparseFile')  // ??
..........
      ,(Bit:19; Attribute:524288;   Text:'?'; LongText:'Pinned')     // should be P
      ,(Bit:20; Attribute:1048576;  Text:'?'; LongText:'Unpinned')   // should be U
from here https://learn.microsoft.com/en-us/wi...ommands/attrib


on side note : files can be pinned and unpinned at the same time.
also found this (by searching) https://ss64.com/nt/attrib.html

The one that is really i don't understand what it does is this one
Zitat:
{+\|-}b Sets (+) or clears (-) the SMR Blob file attribute.
As i can't find any helpful resource about it, and why if possible a local file can have it !? yet, on my PC it only report "Invalid switch - +b", like i am not allowed to change this attribute or even access it.
Kas
  Mit Zitat antworten Zitat
Amateurprofi

Registriert seit: 17. Nov 2005
Ort: Hamburg
1.087 Beiträge
 
Delphi XE2 Professional
 
#3

AW: Zeichen für Datei-Attribute

  Alt 5. Aug 2024, 00:27
Thank You, Kas Ob.

Zitat:
One thing though, where did you get these letters from ?
I mean this part might be wrong, ( i think !! )
Code:
      ,(Bit:9; Attribute:512;     Text:'P'; LongText:'SparseFile') // ??
I got the "P" for SparseFile from the Windows-Explorer.

Pic1.jpg (Own Application) shows for a file that Bit 9 (SparseFile) is set.
Pic2.jpg (Windows Explorer) shows for that attribute for that file a "P"
Angehängte Grafiken
Dateityp: jpg Pic1.jpg (112,0 KB, 33x aufgerufen)
Dateityp: jpg Pic2.jpg (188,5 KB, 30x aufgerufen)
Gruß, Klaus
Die Titanic wurde von Profis gebaut,
die Arche Noah von einem Amateur.
... Und dieser Beitrag vom Amateurprofi....
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
389 Beiträge
 
#4

AW: Zeichen für Datei-Attribute

  Alt 5. Aug 2024, 07:40
Thank you, Amateurprofi !

Now the question is :
How your Explorer will report the Pinned and Unpinned bits ? and how it will change when the file is sparse one ?

Here what i see here
2024-08-05 09_36_10-Kas.png

Also i tried the steps from here https://superuser.com/questions/5088...file-attribute yet my Explorer didn't show any letter for the sparse file, even though the file is marked with sparse attribute, my Windows 10 didn't show any special letter for it.
Kas
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
389 Beiträge
 
#5

AW: Zeichen für Datei-Attribute

  Alt 5. Aug 2024, 07:56
And found two more letters
https://en.wikipedia.org/wiki/File_attribute

Zitat:
Not Content-Indexed (I): When set, Indexing Service or Windows Search do not include the hosting file in their indexing operation.
Reparse Point (L): The file or directory has an associated re-parse point, or is a symbolic link.
Offline (O): The file data is physically moved to offline storage (Remote Storage).

///// ??? again this ???
Sparse (P): The file is a sparse file, i.e., its contents are partially empty and non-contiguous.
I and L can be seen with link files like the directory "Cookies" in your user directory.
Kas
  Mit Zitat antworten Zitat
Amateurprofi

Registriert seit: 17. Nov 2005
Ort: Hamburg
1.087 Beiträge
 
Delphi XE2 Professional
 
#6

AW: Zeichen für Datei-Attribute

  Alt 5. Aug 2024, 14:41
Yes.
Pic3 and Pic4 show Users/Defaults/Cookies in my Application and in the Windos-Explorer.
Angehängte Grafiken
Dateityp: jpg Pic3.jpg (111,5 KB, 24x aufgerufen)
Dateityp: jpg Pic4.jpg (67,1 KB, 22x aufgerufen)
Gruß, Klaus
Die Titanic wurde von Profis gebaut,
die Arche Noah von einem Amateur.
... Und dieser Beitrag vom Amateurprofi....
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:07 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz