Jump to content
Sign in to follow this  
clearguy

How to find the number of chars in a file?

Recommended Posts

clearguy

Hi,

I need to know how much chars are in a file,it could be any file possible.

I tryed to FileRead then StringLen,but it just gives the first lines of a file.

Is there a possibility with FileGetSize,then to calculate the amount of chars with the size in bytes?

thanx

Share this post


Link to post
Share on other sites
Jos

Hi,

I need to know how much chars are in a file,it could be any file possible.

I tryed to FileRead then StringLen,but it just gives the first lines of a file.

Is there a possibility with FileGetSize,then to calculate the amount of chars with the size in bytes?

thanx

FileGetSize() returns the numbers of bytes of a file Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
SmOke_N

yes I know.Is each character equal to a certain amount of bytes?

StringLen(FileRead($File)) doesn't work for you?

Or if you're using 3.1.1

StringLen(FileRead($File), FileGetSize($File))?


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Jos

yes I know.Is each character equal to a certain amount of bytes?

When i went to school 1 character was 1 byte... don't think it changed unless you use Unicode which uses 2 bytes for each character.

:P


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  

×