win-file-magic File command on windows to organize file type. Can be compiled with Visual Studio, but just tested with version 2015. The target file name is file.exe. File libmagic.dll and file magic.mgc are referenced. Demo picture: