I actually have a relatively simple problem.
I would like to copy a file name.table and copy it with a different name name_check.table to another directory.
I got it with the
List files folder node create directory. Attempted copy / move Files (legacy) node, string manipulation node variable, but simply no file copy is created in the directory.
I search the forum but i didn´t found an example or I missed it.
Thx in advance.
You could try and use the (legacy) Copy/Move file node and create individual names as URIs (eg give a prefix or change the name):
I created an example showing how to create local URI strings to give individual outputs. Other than that the Copy/Move node allows you to just give a folder (unfortunately KNIME protocol syntax does not seem to work).
To construct an individual filename could be useful if you want to add a prefix or a timestamp or something.
I admit that is not entirely straightforward. You could still just use the local folder from the /target2/ example
Also there are thes examples using the new path variables that try to manipulate and transfer files.
Many thanks for the quick reply.
Below I show the two setups of my workflow:
Table Writer Node creates the file with the name BelegNr-Kontroll.table:
I now want to rename this file to
Beleg Nr-Kontrolle Check.table and copy/move it to the folder “ BelegNrtablefuerkontrolle”
With the transfer Files node it is easy to copy the file “
Beleg Nr-Kontrolle Check.table” in subfolder “BelegNrtablefuerkontrolle”, but i find no way to change the file-name.
I hope i can do this with the "string manipulation (variable) Node, but i don´t work:
Connect this Node to the table Writer Variable output port an connect it with die copy/move node:
I’m still doing something wrong or do not understand the node copy / move files correctly what they do and which parameters are required for renaming the file name.
If you have knime 4.4 installed you can use the transfer files (table) node and in order to manipulate the file names the column expressions node. It now supports path columns.
You might want to check this example:
Do exactly what I want! Perfect!
But it is very difficult to understand for beginners in KNIME!
@USCHUKN1ME it might be there is a simpler way but there are various methods to handle files and paths and nodes to manipulate them. In general I recommend reading the:
a long read but very useful to understand how KNIME is working with its data
I get to copy the file with this node, but renaming is not (yet) accessible to me with this node!
Select from Table rather than from file chooser. This allows you to select the column in the table containing the new file names. You also might wonna check delete so your old files are being deleted. The node internally currently copies the file rather than doing a rename operation.
Btw. The column to select has to be a path not an uri column
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.