How to list a folder-tree (Professional and Enterprise MFT)

CompleteFTP has the ability to obtain the listing of an entire folder tree in a single operation. This saves having to recurse through the tree, which can be time-consuming. The listing is available through a file called _treeList.json which is listed when the Folder-tree file option is enabled. This option is in the Details category of the folder properties panel. It's off by default.

This feature was developed in cooperation with the developers of SyncBack Pro/SE, which, since version 9, uses it to speed up synchronization.

Format of the folder-tree file

Although the extension of the file is .json, the format has been optimised slightly in order to reduce its size since many folder-trees are extremely large. The optimisation is that field names are not in quotes, which, in the opinion of the developer, should've been optional anyway.

_treeList.json contains a single line per file or directory. It looks something like this:

[
{n:"file001.txt",l:1024,t:"2018-08-05T07:08:57Z"},
{n:"file002.txt",l:1024,t:"2018-08-05T07:08:57Z"},
{n:"/directory11",t:"2018-08-05T07:08:57Z"},
{n:"file111.txt",l:1024,t:"2018-08-05T07:08:57Z"},
{n:"file112.txt",l:1024,t:"2018-08-05T07:08:57Z"},
{n:"/directory11/directory12/",t:"2018-08-05T07:08:57Z"},
{n:"file121.txt",l:1024,t:"2018-08-05T07:08:57Z"},
{n:"file122.txt",l:1024,t:"2018-08-05T07:08:57Z"}
]

where n = name, l = length (only for files) and t = timestamp (UTC)

If the name starts with a forward slash then it's a directory, otherwise it's a file. For directories, the name is the full path with the directory in which the folder-tree file is placed being the root. For files the name is just the file-name without the path. Files at the beginning of the listing (i.e. not preceded by a directory) are in the same directory as the folder-tree file. Files listed immediately below a directory are in that directory.