Rename and move file

Hello,

I’m trying to rename some pdf files, then move them to a new folder.
Folder 1 contains documents A.pdf, B.pdf, C.pdf. I want the files to be renamed A_abc.pdf, B_kjd.pdf, c_wer.pdf (the current name and the new one after the renaming are in Excel). After renaming, find them in folder 2.
Can you help me with an idea, how to create this flow to work?
Thank`s

@madac welcome to the KNIME forum. You could take a look at this example:

2 Likes

Hi @madac,

@mlauber71 bring greats solutions for you…

I’ll try to simplify from how I do it for some cases ok?

1- You can use the List Files/Folders node to bring all path that you need to listening;
(if you use excel/csv/file reader, you can add the option to add the path from this origin too);

Excel Example:

2- you can create a string manipulation do add a column that will be the result, changing the file name, or folder as you wish;

3- use the Transfer files to make this transition from the origin to the destiny using the paths as workflows variables.

Example:

Remember to check to create the folder if don’t exists and if necessary, overwrite the file too.

If you will move the file, you can mark the delete option from source, BUT always make a test for just copy firsts and then for delete if success.

Did you understand these steps?

I hope that it will help you.

BR,

Denis

4 Likes

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