How to AddFile from destination tab (Selected files)

How to AddFile from Destination Tabs Selected files?
I want to AddFile from the destination tab. the file I want to add is already selected by this command:

cmd.RunCommand('Select (coverart|folder).jpg');

I have found a temporary solution for that job, but I believe there is a better way for do the same job.

var FirstFile2 = clickData.func.desttab.selected_files(0);
var FirstFile3 = clickData.func.desttab.selected_files(1);
cmd.AddFile(FirstFile2);
cmd.AddFile(FirstFile3);

I'm not sure where the question is here. Just take to the path to file you want to add, and add it. Which part are you having problems with? You don't need to select the file first in order to add it.

I have some files only (not dir) on my Destination file display. How to add those files with cmd.AddFile();

Call cmd.AddFile(x) where x is the path to the file you want to add.