Menu

#1120 Does GetSize has problems to get informations from big files?

3.0 Alpha Series
open
nobody
None
6
2015-05-10
2015-04-30
SysDam
No

Hi.
Am I doing something wrong in here or does GetSize in nsis 3.0b1 has problems with big files?
I've also tried older versions of nsis, but the problem is always the same.

If I activate the "IfError", I never ever get an output, because there is always (in both of this two usages) an Error.
[FileSizeInfos: 3.vhd on D: is about 500 K (this output works)
2.vhd on N: is about 20 G (no chance to get the Size)
]

-------- my use of GetSize in a function ------------
ClearError
${GetSize} "D:_TEMP_sub" "/M=3.vhd /S=1K /G=0" $1 $0 $2
; IfErrors 0 +5
DetailPrint "Found the file on D:"
DetailPrint " Size: $1"
DetailPrint " SumFiles: $0"
; MessageBox MB_OK "Error at GetSize-sub"

ClearError
${GetSize} "N:_sub" "/M=2.vhd /S=1G /G=0" $1 $0 $2
; IfErrors 0 +5
DetailPrint "Found the file on N:"
DetailPrint " Size: '$1'"
DetailPrint " SumFiles: '$0'"
; MessageBox MB_OK "Error at GetSize-sub"
------ end of my usage ---------------------------------

---- output of log window -----------
Found the file on D:
Size: '534'
SumFiles: '1'
Found the file on N:
Size: ''
SumFiles: ''
--------end of output------------

Do you know what is wrong in here?

Discussion

  • SysDam

    SysDam - 2015-04-30

    .... and by this way:
    "Thank you guys for this great tool called nsis.
    It's simply the best!"

     
  • SysDam

    SysDam - 2015-05-02

    I mean ... I do know that the installer is limitted to 2 GB.
    (I do not know why, but I know it.)

    But why this limitation also applies to GetSize?

     
  • Anders

    Anders - 2015-05-03

    It probably uses 32bit signed math internally.

    If you need to work with files of this size you need to write your own function...

     
  • SysDam

    SysDam - 2015-05-10

    Thank you Anders for your reply.

    Unfortunately I'm not really good at writing such functions.

    Meanwhile I worked around this problem with a batch file
    "dir filename.extension /w > getSize.txt"
    and "FileSeek" and "WordFind".

    I know that it's not the best method, but better than nothing. :)

     

Log in to post a comment.