This is, of course, a tepid solution. The file name has no real connection to the file contents so it is possible for this program to provide erroneous results.
Anyone have a better solution?
Here's what I have now.
Code: Select all
Let>TestFile=C:\MyVideoFile.avi
GoSub>IsItAVideoFile,TestFile
If>ItsAVideo=1
MDL>%TestFile% is a video file
Else
MDL>%TestFile% is NOT a video file
EndIf
//Usage
//GoSub>IsItAVideoFile,file name
SRT>IsItAVideoFile
IfFileExists>IsItAVideoFile_var_1
Let>VideoExtensionList=.3g2;.3gp;.3gp2;.3gpp;.3mm;.60d;.aep;.ajp;.amv;.amx;.arf;.asf;.asx;.avb;.avi;.avs;.axm;.bik;.bin;.bix;.box;.bsf;.byu;.camrec;.cvc;.d2v;.d3v;.dce;.dif;.dir;.divx;.dmb;.dpg;.dsy;.dv;.dvr-ms;.dvx;.dxr;.evo;.eye;.f4v;.fbr;.fbz;.fcp;.flc;.flh;.fli;.flv;.flx;.gl;.grasp;.gvi;.gvp;.hkm;.ifo;.imovieproj;.imovieproject;.ivf;.ivr;.ivs;.izz;.izzy;.lsf;.lsx;.m1pg;.m1v;.m21;.m2a;.m2t;.m2ts;.m2v;.m4e;.m4u;.m4v;.mgv;.mj2;.mjp;.mjpg;.mkv;.mnv;.mod;.modd;.moov;.mov;.movie;.mp21;.mp2v;.mp4;.mp4v;.mpe;.mpeg;.mpg;.mpg2;.mpv2;.mqv;.msdvd;.msh;.mswmm;.mts;.mtv;.mvb;.mvc;.mvd;.nsv;.nvc;.ogm;.ogv;.par;.pds;.piv;.playlist;.pmf;.prel;.pro;.prproj;.pva;.pxv;.qt;.qtch;.qtl;.qtz;.rcproject;.rdb;.rec;.rm;.rmvb;.roq;.rp;.rts;.rum;.rv;.sbk;.scm;.scn;.sfvidcap;.smi;.smil;.smk;.smv;.spl;.srt;.ssm;.str;.stx;.svi;.swf;.swi;.swt;.tda3mt;.tivo;.tod;.tp;.tpr;.trp;.ts;.vc1;.vdo;.veg;.vf;.vfw;.vgz;.vid;.viewlet;.viv;.vivo;.vlab;.vob;.vp6;.vp7;.vro;.w32;.wcp;.wm;.wmd;.wmmp;.wmv;.wmx;.wvx;.xvid;.yuv;.zm1;.zm2;.zm3;.zmv;
Separate>IsItAVideoFile_var_1,.,extension
Separate>VideoExtensionList,.%extension_2%;,ext_search
If>ext_search_count>1
Let>ItsAVideo=1
Else
Let>ItsAVideo=0
EndIf
Else
MDL>File:%CRLF%%IsItAVideoFile_var_1%%CRLF%Not Found...
EndIf
END>IsItAVideoFile