Hi @PLS_KN , sorry was busy earlier.
I put something together quickly for you. A side note to @Mark_Ortmann , there’s actually a Transfer Files (Table) version that can read the source from the table, just like the Copy/Move Files node did.
The workflow looks like this:
Details as follows:
For the demo, I created 6 csv files with the naming of file_1.csv up to file_6.csv, with file_2.csv, file_3.csv and file_5.csv as empty files and zipped them into a file called files.zip:
And the file_1.csv has:
id,name
1,test1
file_4.csv has
id,name
4,test4
file_6.csv has
id,name
id,test6
In my example, my zip file is in my data folder (“Relative to” option), and I want to decompress the files into a sub folder in my data folder called “Decompressed Files”:
You can also check addition options such as creating missing folders, and to overwrite if exists.
After running the Decompress node, I get these files in the Decompressed Files subfolder:
The Files/Folders Meta Info produces this:
I filter only on those whose size is 0:
And I get the expected 3 files:
I configured the Transfer Files (Table) node as follows:
So, basically I want to move the 3 empty files to a subfolder in my data folder called “Empty Files”, and I want to make sure that I check the “Delete source files / folders” option, that way it will do a “move” (copy and delete)
After running the node, my Decompressed Files subfolder no longer has the empty files:
And the empty files are now in my Empty Files subfolder:
So, at this point, the CSV Reader will only find non-empty files in the Decompressed Files subfolder:
We can see from the configuration that it’s seeing 3 csv files, and we can already see from the Preview that it’s reading 3 csv files.
And this is what I get from the CSV Reader:
All was achieved without any Loop.
Here’s the workflow (zipped file included): Ignore empty files when reading from csv reader.knwf (15.0 KB)