I just realized I accidentally removed the extension for hundreds of files in a folder at some point in time. And I remembered how Amiga was conveniently able to provide real file type regardless of the extension or even lack of one.
So, I wonder if Opus is capable of this or it solely leans on the file extension to determine the file type?
Opus has a Blob object to help scripts read and process raw binary data, since it's often not something the scripting languages are good at.
Depending on how accurate you want to make the column, you could just look at the first few bytes to see if they have the "magic values" at the start of Zip and RAR files. Parsing the header more to get more accurate results is also possible, but maybe more work than it's worth, depending on what you're aiming for.
I am not too ambitious about the accuracy, at least not at this moment.Here is the quick win that works. I believe it's not too efficient since I was not using blob object. I still need to figure out how to use it. On the other hand there are couple of unreadable characters at the end and this would need to be taken care of, as well as the plain text file that I would need to somehow prefilter and exclude from the processing.
In another words - this works but it's very spartan and not for further publishing.
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f2read
If scriptColData.col <> "RealFTExt" Then Exit Function
If scriptColData.item.is_dir Then scriptColData.value = ""
Set fso = CreateObject("Scripting.FileSystemObject")
Set f2read = fso.OpenTextFile( scriptColData.item.realpath, ForReading)
scriptColData.value = f2read.Read(5)