Page 1 of 1

return data in custom column

Posted: 19 Mar 2017 09:00
by yusef88
Hi everybody

if the file contents has English letters can Custom column show ENG beside the file

Code: Select all

quicksearch("<cc_item> /contents=[a-z] /contflags=r /u");

Re: return data in custom column

Posted: 19 Mar 2017 09:18
by highend

Code: Select all

return (quicksearch("/contents=[a-z] /contflags=r /u", <cc_item>)) ? "ENG" : "";

Re: return data in custom column

Posted: 19 Mar 2017 10:10
by admin
Why quicksearch?

This will read the first 8 bytes of a file in a custom column:

Code: Select all

$a = readfile("<cc_item>", "b", 8);
You can then test them for being English.

Re: return data in custom column

Posted: 19 Mar 2017 11:20
by yusef88
@highend you never let me down thanks :D
@admin the first 8 bytes maybe numbers or symbols thanks

Re: return data in custom column

Posted: 19 Mar 2017 11:46
by admin
It was just an example. You can read any number of bytes.