Storage of filenames (URLs) as flow variables

I am new to KNIME and had some questions on using flow varibles to hold and create filenames for a workflow that have been working on. After getting some suggestions from readers of this forum, I was able to define the flow variable for the input filename (through the flow variable dialog in the CSV Reader node) and looked at the value after browsing for the file,
it was stored as :
file:<path to the file>/<filename>
This string was stored in my flow variable for the input filename. So of course when I modified this string by appending a new prefix the new flow variable was stored as
file:<path to the file>/<filename>_processed.csv
Using this value for the output filename resulted in the creation of a directory "file:" off of my home directory. I think that this is happening because it is storing the variable as a URL and using the incorrect value of "file:/" as the protocol reference. (it should be "file://" if it is being used in this way). However it should not be part of the value of the flow variable. I worked around the issue by using a substring function call in the Java Edit Variable node to eliminate the "file:" prefix.
I then refered to a different file that was stored in a directory that had a space in its name. To my surprise, the entire path was URLencoded, where the space characters were replaced by '%20'. Of course the output file was stored in a new directory that had the characters '%20" embedded in its name. 
This just confirms that KNIME is converting the filename to a URLencoded reference for its own purposes, but it seems incorrect to me to expose this encoding in the value for the flow variable.
Again I was able to work around this problem by passing the previous string through a Java function that will decode URL encoded strings.
In the method body I defined the new flow variable as follows:
String temp="";

try {

temp = new java.net.URI(($${Sinput_filename}$$+&quot;_processed.csv&quot;).substring(5)).getPath();

} catch (Exception e) {

}

return temp;

Can anyone tell me if this is expected behavior? 

This encoding seems to me to make it much more difficult to work with flow variables to do simple things such as string modification.

If this is not expected behavior perhaps someone can record this as a defect to be resolved in a future release.

 
Thanks for you help,
Scott

Hi Scott, 

Are you aware of the URL to File path node?  See the attached example, it should save you some work.

Regards,

Aaron