We are trying to parse a file name in order to create a folder.
The source sends to mft files like this
ID – name-All items-2017-01-17.xml
ID – name.done
ID – name-Document-000000008084-000001.zip
Now I need the zips and xml files with the same ‘name’ to go in the same folder.
Currently I run 4 different steps
List files…. > raw name
Take rawname…. Name withoutextension…. == var1
Take var1 and remove and symbols and date
Then with another variable I remove the spaces each side of the first dash….
The problem is sometimes my final variable name contains a empty space I tried to add the trim function but doesn’t work
Is there a better way to do this?
For example ..
Step one remove all extension
Step 2 would be ….. remove anything after the second dash and any whitespace