Show all (known) properties of a file or folder

Discuss and share scripts and script files...
PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Show all (known) properties of a file or folder

Post by PeterH »

SammaySarkar wrote: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.

Code: Select all

		If (substr($token, 0, 2) == '//') {continue}	// loop to ignore a commented token
Last things first: allowing commented lines is just fine - so implemented it to my local script version :D
(Think I'll update/upload it later...)

The rest says: that's about use case 8)
I had written it to simply display *all* properties for any object: -Select, -Start, -SeeAll :tup: ("Academic use")
You just want to see a somehow "restricted" set of properties - for "practical use".

Hmmm - I will try to think about an ability to maybe combine both in 1 script.
(But thinking isn't so good these days :P )

klownboy
Posts: 4400
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.7171 at 100% 2560x1440

Re: Show all (known) properties of a file or folder

Post by klownboy »

PeterH wrote:Very glad if it's of use
It certainly is. I really like your table layout method. Thanks very much PeterH.

I was curious how it would look if I left justified the Properties column instead of right. I wasn't crazy about the look and readability right justified so I tweaked the line...

Code: Select all

{$propnm	= SubStr(StrRepeat(' ', $minlprop).$propnm, -$minlprop)}
to ...
{$propnm	= SubStr("$propnm ". StrRepeat(' ', $minlprop -$propnm), 0, $minlprop )}
...just to see how it looked. Both have their drawbacks since the properties lengths can vary so much...just a personal taste thing I suppose.

Question: Where does the variable $token come into play? You use it in the script and Sammay use it in his modification but it doesn't exist. I'm assuming you mean "$propnm" the foreach token? I like that Notepad++ lets you highlite a name and it will then automatically highlite all that match it. :)

Edit: As you had discussed with Sammay, I suppose you could add a line that would not show those system items Sammay mentioned like

Code: Select all

If ("|System.PropList|System.FindData|System.DescriptionID|System.Search|" LikeI "*|$propnm|*") {continue}	
but maybe it could be based on a new $showall value that the user could change if they desired.

I hope you're on the getting better end of that flu. Thanks again,
Ken
Last edited by klownboy on 14 Feb 2015 17:35, edited 1 time in total.

PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Show all (known) properties of a file or folder

Post by PeterH »

klownboy wrote: Question: Where does the variable $token come into play? You use it in the script and Sammay use it in his modification but it doesn't exist. I'm assuming you mean "$propnm" the foreach token? I like that Notepad++ lets you highlite a name and it will then automatically highlite all that match it. :)
I hope you're on the getting better end of that flu. Thanks again,
Ken
Ohoho :oops:
In a prev version $token was the loop variable - later I renamed it to $propnm.
- The editor didn't rename this occurence :shock: :shock: (Nonono - it wasn't me :whistle: )
(Glad: this line had no meaning but find (non-existent) empty lines :P )

I attach my current version without this :bug:
- minor new things like "Comments allowed", and some more info (#found, time used)

Still playing with flu and the script :titter:
Attachments
properties.xys
(2.02 KiB) Downloaded 232 times

Filehero
Posts: 2720
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: Show all (known) properties of a file or folder

Post by Filehero »

Hi,

another great script, Peter. :tup: :appl:

@Ken: thanks for th eright-alignment 'tweak', I like it better then left-aligned.

@highend. I suggest this script to be added to the Overview of existing scripts

Sort, Select, Filter, Search

Title: Show All Properties (actually, that's your turn, Peter)
Description: Show all known properties of a selected file or folder
Link: http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=13397
Author: PeterH
Labels: property, properties, file, folder

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Show all (known) properties of a file or folder

Post by bdeshi »

klownboy wrote:
PeterH wrote: Question: Where does the variable $token come into play? You use it in the script and Sammay use it in his modification but it doesn't exist. I'm assuming you mean "$propnm" the foreach token? I like that Notepad++ lets you highlite a name and it will then automatically highlite all that match it. :)
in my defense, I didn't even consciously read the code, but copied this line:

Code: Select all

 		If ($token LikeI '') {continue}					// loop to ignore an empty token
So I also blame Peter's text editor. :whistle:
Wonder why it worked.... oh, it's because there isn't any property like //System.PropList.ConflictPrompt :oops:
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Show all (known) properties of a file or folder

Post by PeterH »

SammaySarkar wrote:So I also blame Peter's text editor. :whistle:
That's OK with me :biggrin:
Silly software! :ninja:
(Maybe it's rusty and needs some oil :P )
(...like me :eh: but oil doesn't help :x )

:om: :cup:

Post Reply