Ensure '<CR><LF>' does not appear in a extracted filename

Discuss RoboTask here
Post Reply
ntesla22
Posts: 4
Joined: Wed Oct 22, 2014 11:04 pm

Ensure '<CR><LF>' does not appear in a extracted filename

Post by ntesla22 »

Hello

I have a situation where I want to identify the file path and name of a TXT file in C:\Temp. Let's say the file is called 'test_file.txt' I have used the 'Search For File' and then the option of 'Save the File List to Variable', using the variable name file_name.

When I later ask RoboTask to run {file_name}, the process fails, with the log saying 'Cannot open file "C:\Temp\test_file<CR><LF>.TXT". The system cannot find the file specified'.

In short, somehow '<CR><LF>' is being added and I'm not sure why.

How can I avoid this '<CR><LF>' problem?

Regards
Oleg
Site Admin
Posts: 3201
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Ensure '<CR><LF>' does not appear in a extracted filenam

Post by Oleg »

It would be great to see your task. Maybe I can find your mistake.

You can remove EOL symbols by using STR Trim action

The log panel transforms EOL symbols to "<CR><LF>" string for visualization.
<CR> - carriage return, the symbol #13
<LF> - line feed, the symbol #10
Oleg Yershov
Post Reply