[SCRIPT] Identify File Types Using TrID - July 11, 2014
Posted: 12 Jul 2014 01:18
Updated July 11, 2014
* Initial Release.
Allows identification and verification of file types using Marco Pontello's TrID. There are times you run across files that either have not extensions or does not open up correctly perhaps due to wrong extension. Usually you can just open up the file in notepad if it's small enough and hope it's a text type file but other times, it's not possible. With TrID, it can help identify the possible file types.
I made this simply because I download many files and also a lot of images. For some reasons, there are sites where I download images that don't save the extensions correctly. Since there are many files that are either jpg or png, I usually have to rely on IrfanView to tell me if an image file has a wrong header compared to its extension. This saves me a bit more time since it saves a lot of clicks and especially if you are using the custom column script, you can sort by file types which makes it easy to select and batch change the extension.
Setup
Save TrIDNet.icon (icon file) and TrID.xys file into <xyscripts>.
Run this snippet code and then left-mouse-click the button to install the TrID executable:To run snippet code, type "Snippet;" into address bar. Then paste the code above. The custom toolbar button can be used just like normal. Left click identifies the file and right click update TrID's database.
Now you have two flavors of custom column to use. The first simply takes the result of the file identification and put them into the column from the most likely file type to the least likely file type. Basically "JPG,MP3" means it's most likely a JPG file and while it has characteristics of an MP3 file, it's lower than a JPG. It's always best to actually use the custom toolbar button or the custom column flavor below to get actual percentages of the possible file types since anything after the 1st possible file type could have very low percentages but the script will still display them.
Alternatively, you can have the custom column with clicking feature. With this, it's a bit easier to test each file by simply clicking the Play button rather than mouse travel all the way to the custom toolbar button and back.
Identification Results
* Initial Release.
Allows identification and verification of file types using Marco Pontello's TrID. There are times you run across files that either have not extensions or does not open up correctly perhaps due to wrong extension. Usually you can just open up the file in notepad if it's small enough and hope it's a text type file but other times, it's not possible. With TrID, it can help identify the possible file types.
I made this simply because I download many files and also a lot of images. For some reasons, there are sites where I download images that don't save the extensions correctly. Since there are many files that are either jpg or png, I usually have to rely on IrfanView to tell me if an image file has a wrong header compared to its extension. This saves me a bit more time since it saves a lot of clicks and especially if you are using the custom column script, you can sort by file types which makes it easy to select and batch change the extension.
Setup
Save TrIDNet.icon (icon file) and TrID.xys file into <xyscripts>.
Run this snippet code and then left-mouse-click the button to install the TrID executable:
Code: Select all
Snip: CTB 1
XYplorer 14.30.0000, 7/11/2014 2:49:41 PM
Action
NewUserButton
Name
TrID
Icon
<xyscripts>\TrIDNet.ico
ScriptL
Load TrID, "TrID";
ScriptR
Load TrID, "TrID Update";
FireClick
0