ok im writing a script to take my old sites.dat file from flashfxp and create a bookmark file for gftp on linux. the problem being the text formatting.

the variable i have all work, the script gets the info, my problem is that i need no spaces and in the first line i need it formatted that exact way.

[%channame/%currenttopic]
hostname=%ip
port=%port
protocol=FTP
remote directory=/
local directory=
%user
%password
account=

i need the file to be named bookmarks, my problem is i have tried many ways of using /write and /writini and i cannot get it to format without spaces and with the brackets.

Any help would be greatly appreciated.