Solved File Reference Object Attributes Property Returning an unexpected 33?

Jason Lee Hayes

Active member
Local time
Today, 21:08
Joined
Jul 25, 2020
Messages
196
Just updating my project and wish to simply pull in some basic common file properties from video files and works as expected however I'm also pulling in ".attributes" and sometimes I'm getting a return code of 33?

I'm using Windows 10.....

Below is the list of expected results and their meanings however i have no idea what 33 represents... Anyone come across this before...

'Normal 0 Normal file. No attributes are set.
'ReadOnly 1 Read-only file. Attribute is read/write.
'Hidden 2 Hidden file. Attribute is read/write.
'System 4 System file. Attribute is read/write.
'Volume 8 Disk drive volume label. Attribute is read-only.
'Directory 16 Folder or directory. Attribute is read-only.
'Archive 32 File has changed since last backup. Attribute is read/write.
'Alias 1024 Link or shortcut. Attribute is read-only.
'Compressed 2048 Compressed file. Attribute is read-only.

Thanks in advance..

Regards,

Jason
 
Last edited:
Just updating my project and wish to simply pull in some basic common file properties from video files and works as expected however I'm also pulling in ".attributes" and sometimes I'm getting a return code of 33?

The file(s) are located on a network NAS drive if that makes any difference but i cannot see how..

Below is the list of expected results and their meanings however i have no idea what 33 represents... Anyone come across this before...

'Normal 0 Normal file. No attributes are set.
'ReadOnly 1 Read-only file. Attribute is read/write.
'Hidden 2 Hidden file. Attribute is read/write.
'System 4 System file. Attribute is read/write.
'Volume 8 Disk drive volume label. Attribute is read-only.
'Directory 16 Folder or directory. Attribute is read-only.
'Archive 32 File has changed since last backup. Attribute is read/write.
'Alias 1024 Link or shortcut. Attribute is read-only.
'Compressed 2048 Compressed file. Attribute is read-only.

Thanks in advance..

Regards,

Jason

Found this as well; no reference to 33 though?

Let- Bit
ter masks Description and notes
--- -------- ---------------------------------------------------------------
R 0x1 Read-only
H 0x2 Hidden
S 0x4 System
(V) 0x8 Volume label (obsolete in NTFS and must not be set)
D 0x10 Directory
A 0x20 Archive
X 0x40 Device (reserved by system and must not be set)
N 0x80 Normal (i.e. no other attributes set)
T 0x100 Temporary
P 0x200 Sparse file
L 0x400 Symbolic link / Junction / Mount point / has a reparse point
C 0x800 Compressed
O 0x1000 Offline
I 0x2000 Not content indexed (shown as 'N' in Explorer in Windows Vista)
E 0x4000 Encrypted

(Attributes introduced in Windows 8:)
(V) 0x8000 Integrity (ReFS volume only)
- 0x10000 Virtual (reserved by system and must not be set)
(X) 0x20000 No scrub (ReFS volume only)

(Attributes introduced in Windows 10, version 1703 (Creators Update):)
- 0x40000 Recall on open
(P) 0x80000 Pinned (OneDrive "always available files")
(U) 0x100000 Unpinned (OneDrive "online-only files")
- 0x200000 (Unused and reserved)
- 0x400000 Recall on data access
 
From the look of things, those return values are defined bit-wise as opposed to sequentially numbered. This implies that 33 is the simultaneous return of 1 + 32, which suggests an archive file that was expected to be read-only was in fact set to read/write.
 
From the look of things, those return values are defined bit-wise as opposed to sequentially numbered. This implies that 33 is the simultaneous return of 1 + 32, which suggests an archive file that was expected to be read-only was in fact set to read/write.

Yes; your quite correct...
Just toggled the Read Only Property within the file and toggles the result from 32 (Read/Write) to 33 (Read Only)

Thanks for your quick response - i can work with this now and continue my project...
 
Yes, you can check the settings by and-ing the value returned with the flag you want to check.

Read-only = (myvalue and 1) = 1

If the value has the "1" bit set, the above Boolean and will return a value of 1 to confirm it is set. The brackets are optional, but make it clearer. And so on for the other bits.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom