How can I get a list of files in a directory as text?
There is simple method for getting list of files in any folder in Android -

Create FTP file connection between your android phone and Windows PC version of Filezilla.

in Filezilla interface, Select your desired folder from remote site pane and drag it to bottom pane of file transfer status.

Now in Queued files pane,choose export option.It will by default save in XML format.Once export xml file created,use Office Excel to getting proper format for edit.