How do I convert a .MT file to a .bin file?
Show older comments
Hi,
I'm trying to convert an MT file into a binary file but have been unsuccessful. Any guidance would be appreciated. Thanks!
3 Comments
Walter Roberson
on 22 Sep 2016
Is a .mt file a MetaTalk script?
Which .bin file format do you need? There is no standard for .bin file: .bin is used to refer to any arbitrary binary file format.
James
on 23 Sep 2016
Walter Roberson
on 23 Sep 2016
It appears that MetaTalk scripts were the programming language for MetaCard, which had its technology purchased by Run Revolution, which then renamed itself LiveCode
MetaTalk scripts in .mt format are text files containing code. They are not data files, and it seems odd that you would want to convert one to a .bin . It would seem more likely that you would want to convert the output of running a .mt script into a .bin .
We are probably going to need a sample .mt and sample .bin .
Answers (1)
Steven Lord
on 22 Sep 2016
If you just need to change the extension, something like this should work (though I haven't tested it):
oldfile = 'myfile.mt';
[oldpath, oldname, oldext] = fileparts(oldfile);
oldnamepath = fullfile(oldpath, [oldname '.' oldext]);
newnamepath = fullfile(oldpath, [oldname '.bin']);
movefile(oldnamepath, newnamepath)
If you need to change how the data is stored, you will need to know the format in which the data is stored in your original file and the format in which you want the data to be stored in the new file. As Walter said in his comment, you haven't stated the format of the .mt file and there is no standard .bin format as far as I'm aware.
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!