Integer file size for binary

Integer file size for binary

  

Hello good night I'm using the File_GetSize function where I pass the file and it returns me the file size, only the return is in integer so I can not do the dowload this file. I would like to know if you have how to transform this integer into binary without changing the size of the file, because when I do the conversion it takes the value of the file and put it in bytes and when I do the error download.


I want to know if I can change this integer to binary leaving the same size as the source file?

Hi Daianne,

I really have no clue whatsoever what you want to do. What you say makes unfortunately no sense at all to me.

File_GetSize does as the name suggest return the size of the file in bytes. And of course this is an Integer value (although with really large files > 2GiB this goes wrong, a Long Integer would be better).

It seems you want to retrieve the actual content of the file or something? Why would you think you can use File_GetSize for that? Please explain better what you want.

Kilian Hekhuis escreveu:

Oi Daianne

Eu realmente não tenho ideia do que você quer fazer. O que você diz, infelizmente, não faz sentido para mim.

File_GetSize faz como o nome sugere retornar o tamanho do arquivo em bytes. E é claro que esse é um valor Integer (embora com arquivos realmente grandes> 2GiB isso dê errado, um Long Integer seria melhor).

Parece que você quer recuperar o conteúdo real do arquivo ou algo assim? Por que você acha que pode usar File_GetSize para isso? Por favor, explique melhor o que você quer.



I'm using the GetSize File function because I'm passing a file, I need to retrieve the actual contents of the file that function returned me in integer and turn into binary. Plus the file function GetSize the return type and an integer would like to know if you can turn into binary

Solution

Hi Daianne,

I assume that you just want the file contents, right? For getting the file contents, you don't need the File_GetSize Action, you use the File_ReadBinary Action. It has the same input as File_GetSize (viz. the path to the file), and returns the binary content of the file.

Solution