Show all (known) properties of a file or folder
Show all (known) properties of a file or folder
With SammaySarkars list of Canonical Property Names I made a script to
- read them from a .ini file
- execute a Property() command for the current file (or folder) with *each* of those names
- filter all replies with no return (can be switched of)
- make a table of all "names = values"
- and display the result
The result should be a list of all valid Properties for a file.
Some values end on 0x00 - display output would stop: these are tested for and eliminated.
At least one value has a lot of 0x00 - these are still ignored and lead to end-of-output
On execution suddenly stepping mode starts: either control the variables or just press 3x Ctrl-Enter
(This is still debug code, but no risk at all!)
Attached the script, and a .ini - the .ini must be in the same directory, with same name as script but ending changed to .ini (as .ini isn't allowed here: change .ini.xys to .ini)
(In the moment: don't change the .ini contents debug code is just for this file!)
If you want to look at the script: set a tabsize of 4 - then it's formatting is quite friendly
(State: in development. Will be made better - at least the terminated output...)
- read them from a .ini file
- execute a Property() command for the current file (or folder) with *each* of those names
- filter all replies with no return (can be switched of)
- make a table of all "names = values"
- and display the result
The result should be a list of all valid Properties for a file.
Some values end on 0x00 - display output would stop: these are tested for and eliminated.
At least one value has a lot of 0x00 - these are still ignored and lead to end-of-output
On execution suddenly stepping mode starts: either control the variables or just press 3x Ctrl-Enter
(This is still debug code, but no risk at all!)
Attached the script, and a .ini - the .ini must be in the same directory, with same name as script but ending changed to .ini (as .ini isn't allowed here: change .ini.xys to .ini)
(In the moment: don't change the .ini contents debug code is just for this file!)
If you want to look at the script: set a tabsize of 4 - then it's formatting is quite friendly
(State: in development. Will be made better - at least the terminated output...)
- Attachments
-
- properties.ini.xys
- (18.81 KiB) Downloaded 452 times
-
- properties.xys
- (1.82 KiB) Downloaded 298 times
Win11 Pro 223H2 Gerrman
Re: Show all (known) properties of a file or folder
New version: a bit more elegant, and able to handle multiple 0x00 in any position of a value.
Results are quite interesting, I think
(Whatever you can do with them... )
Again to say: no risk - only properties are read and a result is displayed.
One strange thing: select a drive in Tree OK
Select a drive in List empty!
Will have a look tomorrow
Good night...
Results are quite interesting, I think
(Whatever you can do with them... )
Again to say: no risk - only properties are read and a result is displayed.
One strange thing: select a drive in Tree OK
Select a drive in List empty!
Will have a look tomorrow
Good night...
- Attachments
-
- properties.xys
- (1.62 KiB) Downloaded 271 times
Win11 Pro 223H2 Gerrman
-
- Posts: 1416
- Joined: 04 Nov 2008 05:35
- Location: Hanoi, Vietnam
Re: Show all (known) properties of a file or folder
U can zip both xys and .ini files together.
Or better use Heredoc to combine .ini into the .xys filebtw, remove column "line number" and "string length" might speedup the script?
Or better use Heredoc to combine .ini into the .xys file
Code: Select all
rtfm "idh_scripting.htm#idh_scripting_heredoc"
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
Re: Show all (known) properties of a file or folder
An alternative is to use a block like this inside a blockquote somewhere in the xys (at beginning is best):binocular222 wrote:U can zip both xys and .ini files together.
Or better use Heredoc to combine .ini into the .xys filebtw, remove column "line number" and "string length" might speedup the script?Code: Select all
rtfm "idh_scripting.htm#idh_scripting_heredoc"
Code: Select all
//other comment or code
/*
[Settings]
[keepme]
*/
//comment or code
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Site Admin
- Posts: 60606
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Show all (known) properties of a file or folder
Fascinating!
1) text <prop System.PropList.ConflictPrompt>;
What does this return mean? Why is it prefixed with "prop:"? (Looks like XY's "prop:" prefix but comes from the system... )
2) Made me find and fix some small bugs in retrieving shell properties.
3) Shell properties will not return any NULLs anymore. Those NULLs were side-effects of the bugs fixed in 2)
1) text <prop System.PropList.ConflictPrompt>;
What does this return mean? Why is it prefixed with "prop:"? (Looks like XY's "prop:" prefix but comes from the system... )
2) Made me find and fix some small bugs in retrieving shell properties.
3) Shell properties will not return any NULLs anymore. Those NULLs were side-effects of the bugs fixed in 2)
FAQ | XY News RSS | XY Twitter
Re: Show all (known) properties of a file or folder
"The list of properties to show in the file operation conflict resolution dialog. Properties with empty values will not be displayed. Register under the regvalue of "ConflictPrompt"." Maybe this properties are shown or at least parsed when displaying file conflicts dialogs.admin wrote:1) text <prop System.PropList.ConflictPrompt>;
What does this return mean? Why is it prefixed with "prop:"? (Looks like XY's "prop:" prefix but comes from the system... )
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Site Admin
- Posts: 60606
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Show all (known) properties of a file or folder
Thanks! Interesting self-referential system.
FAQ | XY News RSS | XY Twitter
Re: Show all (known) properties of a file or folder
Sorry for replying late, but I'm having the flu - and not a very good day
(Yesterday was better )
@binocular222 and SammaySarkar: sure I know of both ways to imbed data into a script. But the intention was a script to work with an external table - as the list of properties might change without me (or you) changing the script.
(And, by sorting the table, you can manage the sequence the results are displayed - if you wish.)
Didn't expect, but tested: removing line# and length doesn't make a notable difference.
But the type of resource makes: .jpg seems veeery slow. (Think it will be opened to read info...)
@Don: fine if it could help to find errors, and learn about contents. I made
The text [Byte Array (##)] is added by you, I think? (Hey: 00 there )
Output of the script is rather clean now, without the dumps
(Yesterday was better )
@binocular222 and SammaySarkar: sure I know of both ways to imbed data into a script. But the intention was a script to work with an external table - as the list of properties might change without me (or you) changing the script.
(And, by sorting the table, you can manage the sequence the results are displayed - if you wish.)
Didn't expect, but tested: removing line# and length doesn't make a notable difference.
But the type of resource makes: .jpg seems veeery slow. (Think it will be opened to read info...)
@Don: fine if it could help to find errors, and learn about contents. I made
The text [Byte Array (##)] is added by you, I think? (Hey: 00 there )
Output of the script is rather clean now, without the dumps
Win11 Pro 223H2 Gerrman
Re: Show all (known) properties of a file or folder
It's not good manners to be ill, , get well soon!
Video files are muuuch slooower. (think it's because of the type-wise PropList value. Nothing else looks slowdowny)PeterH wrote:Didn't expect, but tested: removing line# and length doesn't make a notable difference.
But the type of resource makes: .jpg seems veeery slow. (Think it will be opened to read info...)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Site Admin
- Posts: 60606
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Show all (known) properties of a file or folder
Yes, [Byte Array (##)], "[DataObject Array]", "[Object Array]", "[DataObject]", "[Object]" are by me. Those Objects are not really meant for the reading eye.PeterH wrote:@Don: fine if it could help to find errors, and learn about contents. I made
The text [Byte Array (##)] is added by you, I think? (Hey: 00 there )
FAQ | XY News RSS | XY Twitter
Re: Show all (known) properties of a file or folder
Thanks Don,
and thanks to SammaySarkar, too.
Hope to change my manners - but I'm afraid it will last some more days (as of other people I know)
and thanks to SammaySarkar, too.
Hope to change my manners - but I'm afraid it will last some more days (as of other people I know)
Win11 Pro 223H2 Gerrman
-
- Site Admin
- Posts: 60606
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Show all (known) properties of a file or folder
BTW, your script is really useful! It now has a fixed place on my screen (in the catalog).
FAQ | XY News RSS | XY Twitter
Re: Show all (known) properties of a file or folder
same here. (Though I made a few changes to the ini.)
The aligned table is nice.
The aligned table is nice.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Show all (known) properties of a file or folder
Very glad if it's of use
Just made it for boredom resulted by my flu ...
...and out of curiosity
Sometimes it can be helpful to poke in the dark.
@SammaySarkar: something interesting about your .ini changes?
(Glad to have them external of the script )
Just made it for boredom resulted by my flu ...
...and out of curiosity
Sometimes it can be helpful to poke in the dark.
@SammaySarkar: something interesting about your .ini changes?
(Glad to have them external of the script )
Win11 Pro 223H2 Gerrman
Re: Show all (known) properties of a file or folder
Well, no. I just commented out System.PropList, System.FindData and System.DescriptionID, because they tend to break the table layout. And System.Search because I thought they make it slow.
And I also added this at the beginning of the foreach() to allow commenting out properties.
And I also added this at the beginning of the foreach() to allow commenting out properties.
Code: Select all
If (substr($token, 0, 2) == '//') {continue} // loop to ignore a commented token
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]