Jump to content

Udf: Get Extended File Property


Simucal
 Share

Recommended Posts

  • Moderators

Overkill,

The properties and their index numbers are different depending on the OS. The attached file is what I have gleaned from t'interweb.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Replies 66
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Overkill,

The properties and their index numbers are different depending on the OS. The attached file is what I have gleaned from t'interweb.

M23

I'm on XP...the list can be modified on the machine to include other values (for instance, the +4 attribs on my PC). That's what I was talking about.

Link to comment
Share on other sites

  • 1 year later...

Apologies for reviving an oldish post, but many like me are still probably using the UDF - though it does seem to have issues between versions of Windows, etc.

@Simulcal - I note that you use the following code

$sProperty = $oDir.GetDetailsOf ($oFile, $iProp)
            If $sProperty = "" Then
                Return 0
            Else
                Return $sProperty
            EndIf

which I believe should just be

$sProperty = $oDir.GetDetailsOf ($oFile, $iProp)
            Return $sProperty

Reason being, that it is not necessarily a failure when their is nothing to be returned (i.e. ID3 tags), so '0' is not right.

It should be up to the caller, to deal with what is returned (i.e. nothing = 0 in specific cases).

You also have in your remarked section

On Failure - 0, @Error - 1 (If file does not exist)

yet you use the following in your code (which doesn't match)

$iExist = FileExists($sPath)
    If $iExist = 0 Then
        SetError(1)
        Return 0

So maybe the Return should be -1 to do so.

If I haven't said so before, thanks for the UDF!

It has been very handy in a few of my programs - though I've only used it with Win XP.

Just recently I was caught out when I discovered that the UDF was returning '0' for the ID3 comment tag, which I definitely didn't want displaying in my Viewer field.

I've of course adjusted your UDF for my program, but I thought it best to advise about it also.

I realize I could have just adjusted my program to convert '0' into '', but I thought it much proper for your UDF to be returning the true value as is.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

  • 1 year later...

Attempting to get resolution of a pic

Always returning 0

Win7

What's the problem?

:EDIT:

$sProperty = $oDir.GetDetailsOf ($oFile, $iProp)
If $sProperty = "" Then
Return "ajshdkasjdh"
Else
Return $sProperty
EndIf>

Changed "0" to "ajshdkasjdh"

There is the Problem...

So $sProperty doesnt give me anything back...

Edited by jWalker
Link to comment
Share on other sites

  • 3 years later...

removing post and posting to help section instead of here (since issue can be related to other scripts as well not just the one on this thread)

Edited by gcue
Link to comment
Share on other sites

  • 1 year later...

I know this topic is pretty old but I am having trouble getting the _GetExtProperty and _GetFileProperty to work. This is not recognized at all for me with the latest version 3.6.6 and I have tried downloading beta. Has this been changed or am I still missing something?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...