Page 1 of 1
sort text file
Posted: 05 Mar 2020 17:17
by tsolignani
Good evening everyone.
Anyone ever made a flow to alphabetically sort a text file with many lines each with a string?
Thank you.
Re: sort text file
Posted: 05 Mar 2020 18:57
by Desmanto
I don't remember there is any, but I use it in one part of my AM text tools branch. I retrieve the text from clipboard, sort it and set back to clipboard. The script is one line with nested function.
Code: Select all
clip_data = join(removeElementValue(sort(split(text, "\\r?\\n")), ""), "\n");
Replace text witth the text variable (file_text if you init the text file) and clip_data to the sorted variable.
Re: sort text file
Posted: 09 Mar 2020 11:38
by tsolignani
Thank you so much. It does work like a charm!
You always deliver.
Thanks again and have a nice day.