If you cannot supply a filename in the textfile so that the following values get aligned to a specific file then the sequence of data in the textfile is applied to the sequence of files in the list.
So you have to sort the files or the contents of the textfile in order to get the correct alignment.
Then select the files.
Select Convert > Textfile - Tag
Enter the fieldname (in your case it would be X)
Press OK.
Data will get imported.