Jpizzo 0 Posted December 18, 2014 Report Share Posted December 18, 2014 I have a list with 11300 different cities and I have another list of URL's with 485. I want to trim down my list of 485 urls because they have the city included in the url itself. How can i make a list compare against the other list and eliminate all of the unwanted urls? I havent even started working on this but wanted more of some ideas on next step. Quote Link to post Share on other sites
pash 504 Posted December 18, 2014 Report Share Posted December 18, 2014 Try. clear list(%list1) clear list(%list2) clear list(%listOut) clear list(%removeNum) add list to list(%list1,$list from file("{$special folder("Application")}\\list1.txt"),"Delete","Global") add list to list(%list2,$list from file("{$special folder("Application")}\\list2.txt"),"Delete","Global") add list to list(%listOut,%list1,"Delete","Global") set list position(%list1,0) loop($list total(%list1)) { set(#list1,$next list item(%list1),"Global") set list position(%list2,0) loop($list total(%list2)) { set(#list2,$next list item(%list2),"Global") if($comparison(#list1,"=",#list2)) { then { add item to list(%removeNum,$subtract($list position(%list1),1),"Delete","Global") } else { } } } } set list position(%removeNum,0) clear list(%removeNum2) add list to list(%removeNum2,$sort list(%removeNum,"Descending"),"Delete","Global") set list position(%removeNum2,0) loop($list total(%removeNum)) { remove from list(%listOut,$next list item(%removeNum2)) }Or my Plugin clear list(%test) add list to list(%test,$plugin function("Advanced Data Text File.dll", "$file/string compare", "{$special folder("Application")}\\TEST.txt", "{$special folder("Application")}\\TEST2.txt", "True"),"Delete","Global") Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.