I’m not sure BASIC is the correct driver for this. BASIC creates delimited files (Tab, Comma, etc).
The DOS driver allows you to write any values to a file, including binary data if needed.
Also, if you have StringTheory you can do it with two lines of code.
st StringTheory
code
st.Assign('My File Contents')
st.SaveFile('C:\Temp\MyFile.bat')
TextFile File,Driver(‘ASCII’)
Record Record
data String(1024)
End
End
code
textfile{prop:name} = ‘fred.bat’
remove(textfile)
create(textfile)
open(textfile)
if ~errorcode()
textfile:data = ‘@echo off’;add(textfile)
end
as a newbie Rob, I think StringTheory is the first 3rd party tool you should get. It currently costs 97 USD and will likely pay for itself in short time. If you don’t have that option then Clarion comes with SystemStringClass which will do something similar (although generally not as well).