clearguy Posted August 19, 2006 Share Posted August 19, 2006 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 I've never met anyone who codes binary. StringMultiInsert()SOW EncryptFrench autoit forum - forum français Link to comment Share on other sites More sharing options...
Developers Jos Posted August 19, 2006 Developers Share Posted August 19, 2006 (edited) 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?thanxFileGetSize() returns the numbers of bytes of a file Edited August 19, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
clearguy Posted August 19, 2006 Author Share Posted August 19, 2006 yes I know.Is each character equal to a certain amount of bytes? I've never met anyone who codes binary. StringMultiInsert()SOW EncryptFrench autoit forum - forum français Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 19, 2006 Moderators Share Posted August 19, 2006 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.1StringLen(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. Link to comment Share on other sites More sharing options...
clearguy Posted August 19, 2006 Author Share Posted August 19, 2006 This works fine thanx. I've never met anyone who codes binary. StringMultiInsert()SOW EncryptFrench autoit forum - forum français Link to comment Share on other sites More sharing options...
Developers Jos Posted August 19, 2006 Developers Share Posted August 19, 2006 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. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
randallc Posted August 20, 2006 Share Posted August 20, 2006 but you might not want to count the eol, lf chars... Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now