Hi,
How do i rename a file name which user had uploaded, example
Uploaded filename: CustomerA.doc
Filename to be saved: AA_001.doc
I had tried to directly pass in "AA_001" to the filename input, but it is saving without the extension. So after downloading the file "AA_001", it is not able to be opened, as the computer doesn't know what type of file this it
Thank you
You should get the file extension in String_split.List[1].text.value
Hello,
What type will it be?
Is it going to be doc always?
We need to add extension along with the name in the action.
Regards,
Neha
it can be any type, not necessarily just doc files
In that case you can
1. take the file name
2. extract the extension and
3. save that in a variable.
4. concatenate the variable with your name ("AA_001" + ext_variable )and
5. then download the file.
You ca use string_split to get the extension string after ".".
and then take the extension
Hope this helps.
thanks,
i had tried this method too, but i'm getting the actual file name instead of the extension.
Let me try "xxx.List[0]xxx" method as you had suggested
Hi @Jun Mun Chan
You may prefer to use the OML file below.
I hope this will work for you.
Best Regards,
Rishabh Chawda
For some reasons unknown to me, i couldn't publish and view it in the browser. They had prompted me to refresh dependencies. I tried both ways, as in don't refresh and refresh
And still couldn't open it. So sorry about this
Hi Jun,
An extension always starts with a ".", followed by some text. You can use the built-in Index function to search for the dot, setting searchFromEnd to True so you get the last occurence, then use Substr to extract the extension, and add it to the file name.
i was actually trying to work along this idea, but seems like i just couldn't get it to work
Hi @Jun Mun Chan,If this issue still not resolved, you can share OML with us so that we can understand the issue and help you out.
ThanksNeha