@MarcioMarchiori
Depending on which NiFi Expression Language (NEL) function you are using, either of the following two NEL statements should work for you:
${path:replaceAll("\\\\",'/')}/${filename}
In above you are using the replaceAll function which expects a java regular expression. Since '\" is an escape character and NiFi is a java application, the first \ escapes the second \ and the third \ escapes the forth \. So \\\\ results in a regex of \\ being applied against the value present in the "path" variable.
or
${path:replace('\\','/')}/${filename}
In above you are using the replace function which does not path the first argument to be evaluated as a java regular expression but rather takes a string literal. And since '\' is an escape character you need \\ which tells java to treat the second \ as the literal string value to search for.
If you found this response assisted with your query, please take a moment to login and click on "Accept as Solution" below this post.
Thank you,
Matt