Get-HardlinkInfo Script fails with OverflowException

Welcome Forums General PowerShell Q&A Get-HardlinkInfo Script fails with OverflowException

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 7 years ago.

  • Author
  • #6045

    Points: 0
    Rank: Member

    by mowfax at 2013-03-04 16:28:12


    I need a function to find out if an NTFS file has hardlink siblings and if yes, which ones.
    There's already a script for that, I found it here:

    Problem is that I get this Error when using it:

    Ausnahme beim Aufrufen von "GetFileSiblingHardLinks" mit 1 Argument(en): "Die arithmetische Operation hat einen Ãœberlauf verursacht."
    In D:\testfiles\pshell_script\Get-HardlinkInfo.ps1:138 Zeichen:3
    + $links = [HardLinkEnumerator.Kernel32Api]::GetFileSiblingHardLinks($filepath)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : OverflowException

    (sorry for the german description, I don't know how to get pshell to give me english errors)

    If I use the switch "-count" I get a number and no error. However if I only give a -filepath, it gives me the error. Doesn't matter if I also add the parameter "-all" on top of it.
    My guess is that the error lies within the typedef stuff.

    If there is a completely other solution to get to my goal in finding hardlinks with pshell that's fine, too.
    Thanks in advance...

    by DonJ at 2013-03-06 03:53:38

    Can you *translate* the error? I've no idea what it means.

    by TomKemp at 2013-04-25 03:54:53

    Google Translate says this means 'Arithmetic Operation resulted in an overflow'.

    Hope that helps

The topic ‘Get-HardlinkInfo Script fails with OverflowException’ is closed to new replies.