I don't see why do you need write menu structure to a text file in order to customize it.
Maybe
OOP Menu Project will work for you?
>
> I want write all menu structure to .txt file.
> exp.
> "pad 1"
> "bar 1"
> "bar 1"
> "bar 2"
> "bar 1"
> "bar 2"
> "bar 3"
> "bar 2"
> "bar 3"
>
> I need it to customize menu for user's.
>
> Best regards
--sb--