how to Remove Duplicates ligne By reading the TXT file ???
-
Hi,
I tried to read content inside a TXT file and I want to delete the duplicate lines and then save the file again and it did not work
this image is there a solution or another way ???
-
As you can see the capture test1 doesn't get created for some reason. Because when you use RemoveDuplicates it doesn't output a new list but just removes duplicates on the original list, this is the same behaviour for example of Add and Remove. At least that's my wild guess without looking at the OB code (been a while, don't remember much)
-
@Ruri Is there any function for remove duplicates lines?
-
UTILITY List "test" RemoveDuplicates
Your error was to write <test> instead of just test. I just noticed it ^_^
-
@Ruri I tested it but the same problem remained
-
UTILITY File "test.txt" ReadLines -> VAR "test" UTILITY List "test" RemoveDuplicates UTILITY File "unique.txt" WriteLines "<test[*]>"
Please try my exact script
-
@Ruri said in how to Remove Duplicates ligne By reading the TXT file ???:
[*]
is problem in {"<test[*]>" } If you put the word test, it does not delete the duplicate lines, it depends on the result of the first. I fixed the problem, and this is correct:
UTILITY File "test.txt" ReadLines -> VAR "test" UTILITY List "test" RemoveDuplicates -> VAR "Remove" UTILITY File "unique.txt" WriteLines "<Remove[*]>"
Now is good and option [*] And I've always had problems, and this regex is top
Thank you sir
-
It's not regex, it's just the OB syntax for "all items of this list"
-
@Ruri said in how to Remove Duplicates ligne By reading the TXT file ???:
It's not regex, it's just the OB syntax for "all items of this list"
Thanks for the clarification, and the important thing was amended in script because the script had an error and put the correct one in order for everyone to benefit. Thank you for your support