File merge

Hi all, I have 30 .txt files of the same structure and I want to join them together in single .txt file of the same structure (the file extension is .dig). Which node should I use for that? Joiner or concatenate? I began with List/Files Folders node. And then I guess I should use some kind of loop?

Best wishes

This would be a concatenate operation. The File Reader node will do this automatically if the files are all located in the same folder and you choose the Files in Folder mode.

3 Likes

Hi, I am using Fixed width File reader after the list files/folders so there is no Files in Folder mode.

Do I need to do something with this part?

So far I created this

But it gives results for only one of the files instead of 30, which probably has to do with the setting I posted at the top image.

The List Files/Folders node creates a column called Path, with the path datatype, which contains the filepaths. Your Table Row to Variable Loop Start node converts this to a variable, but the Fixed Width File cannot use variables of the type path. Therefore you’ll need to convert the path datatype to a string before the loop starts. Use a Path to String node:

image

At that point, you would configure the Fixed Width File Reader node to use the string variable containing the filepaths:

image

Thanks, I tried but what I get is this warning


image

Try this arrangement:

image

In the Fixed Width File Reader node, use the URI variable.

2 Likes

Thats it ! Thanks a lot.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.