# MX\_FILECHINFO > [HTML Version](mx_filechinfo.htm) _Added August 2015_ **xcall MIAMEX, MX\_FILECHINFO, ch, status, fileinfo** MX\_FILECHINFO (MIAMEX 161) returns information about an open file based on the file channel. It is similar to FILNAM[xs](keyword-types.htm.md) but provides much more information. **Parameters** _ch_ ([Num](num.htm.md)) \[in\] file channel _status_ ([Num](num.htm.md)) \[out\] returns > 0 if the file channel was located, else 0 _fileinfo_ (ST\_FILE\_METADATA) \[out\] returns info about the file ST\_FILE\_METADAT is defined in [ASHINC](ashincincludefiles.htm.md):ashell.sdf as: defstruct ST\_FILE\_METADATA \! \[103\] File metadata returned by MX\_FILECHINFO map2 SPEC,s,160 \! file spec, as specified in OPEN map2 TYPE,b,1 \! see FILETYPE\_xxx map2 DRIVER,b,1 \! internal implementation code (see FILEDVR\_xxx) map2 MODE,b,2 \! see FILEMODE\_xxx map2 HOOKID,b,4 \! file hook id map2 HOOKFLAGS,b,4 \! file hook flags map2 HOOKEVENTS,b,4 \! file hook events map2 RANDOM'ISAM \! fields for random and ISAM files map3 RECSIZ,b,4 \! record size (according to open; true size for ISAM) map3 BLKFCT,b,2 \! 0=spanblocks map3 RECCNT,b,4 \! # records (does not apply to ISAM-A) map3 ISAMA \! ISAM-A only map4 INDEX,b,2 \! selected index # map4 ISFIND,i,2 \! result of last FIND # - see ISFIND\_xxx map4 ISLOCK,b,4 \! current locked recno map4 LASTRECNUM,b,4 \! last rec # map2 SEQ \! fields for sequential files map3 SPOS,f,8 \! stream pos (0=start, -1=eof) map3 ISEQ \! input files only map4 CSVDELIM,s,2 \! CSV delimiter map3 OSEQ \! output files only map4 OPOS,b,4 \! output column position map4 LINENO,b,4 \! line # for cur pg - same as .LINENO(ch) map4 PAGENO,B,4 \! page # - same as .PAGENO(ch) endstruct **Comments** If you call the function in a version of A-Shell less than 6.1.1416, you may not get an error status, but the contents of the structure will be empty. **History** 2015 August, A-Shell 6.1.1415: Function added to A-Shell