Page 1 of 1

File List - Strange behaviour with spaces

Posted: Sun Oct 27, 2024 2:37 pm
by Rukbunker
Hey Oleg,

For a task I need 2 JPG files which are being modified by ImageMagick. This works, but the error occurs already in the beginning of fetching the files.
An importfolder is being monitored by a File Trigger. After 1 first JPG is detected, the task starts and waits for 5 seconds until the second one arrives.
The Search For Files action, should create a list of the 2 files. Robotask tries that and works, but when spaces in the filename are occuring, that is screwing things up ;) For sure, the solution would be to use no spaces, but that's another discussion (we are dealing with people here), and technically...it should work....right?

The 2 files:
KNipsel.PNG
KNipsel.PNG (11.16 KiB) Viewed 38373 times
Creation of the list:
Knipsel2.PNG
Knipsel2.PNG (21.47 KiB) Viewed 38373 times
The Log Message shows me this: (I'm using: Links: {LIST(0)})
Knipsel5.PNG
Knipsel5.PNG (30.89 KiB) Viewed 38373 times
It looks likes it goes wrong at the first space. The second file (called with {LIST(1)}) is only displaying a "-".

What do I miss here? Using brackets (like ") before and after the filename doesn't solve this issue....

Re: File List - Strange behaviour with spaces

Posted: Sun Oct 27, 2024 3:54 pm
by Oleg
t looks likes it goes wrong at the first space. The second file (called with {LIST(1)}) is only displaying a "-".
Search for files action creates a multiline text (not comma separated string)
So the variable LIST contains the text with two lines (in your case)
You need to use Text loop to process your files sequentially

If you want to retrieve file name by line number use TXT Extract Line action

Also if you want to use comma-separated string use TXT Comma-Text Conversion action

By the way: by default, the space character is a data separator, like a comma in a standard comma-separated string.

Re: File List - Strange behaviour with spaces

Posted: Mon Oct 28, 2024 9:03 am
by Rukbunker
Makes sense. Thanks Oleg!!