Jump to content
UBot Underground

Delete account from .txt file


Recommended Posts

Hello,

 

I have a .txt file of accounts (email addresses) with one on each line and want to remove / delete an account from the text file if suspended. For example “if suspended then delete from .txt file†but I am having trouble figuring out how to delete the account from the .txt file. Any advice is appreciated.

 

Thanks!

Link to post
Share on other sites

Hi,

 

Thanks for the feedback but the "if (suspended)

remove from list" command is what I'm having trouble figuring out. What command do I use to delete the current list item from the list?

Link to post
Share on other sites

Hi,

 

Thanks for the feedback but the "if (suspended)

remove from list" command is what I'm having trouble figuring out. What command do I use to delete the current list item from the list?

 

 

see attached.

remove from list-lowridertj.ubot

Link to post
Share on other sites

There is a little trick you need to implement when removing from a list where the number of loop cycles is the list total. The reason is this...when you remove a "list position" the next list position becomes that list position. For example, you remove position #5...now position #6 becomes position #5 but the loop has already processed that position # so it goes on to #6 (which is really the original #7)...make sense?

 

So I do it like this:

 

set--->#position=0 (outside the loop)

 

nav, do stuff, find one that needs to be removed, remove it, DECREMENT #position, and then INCREMENT it.

 

Now it will re-do the same list position which is actually the next list item. And it won't error over the number of cycles (actually, you may not get an error, but it will skip list items if any are removed)

 

I hope that makes sense.

 

John

 

Note the decrement and increment go inside the THEN node in the conditional statement (yes, both of them) You also need just an increment at the end of the loop in case the condition is not met (you don't remove it from the list).

 

I uploaded an example way back. Here it is:

remove_from_list.ubot

  • Like 1
Link to post
Share on other sites

It's just something that doesn't naturally make sense at first (because decrementing position 0 seems unnatural), but when you see it work, you're like.."Oh, I see now!" (That was my reaction when I first got that working way back)...When you think about it out loud, it makes perfect sense.

Link to post
Share on other sites

I just had a conversation with Eddie who exposed an easier way to do this. If you loop through the list from the bottom you don't have these confusing issues. You do this by setting the #position to $list total and decrementing. No other conditions for this process. here is the version showing this:

remove_from_list_easier.ubot

Link to post
Share on other sites
  • 1 month later...

Thanks for the feedback guys but I am still completely lost on this one. It just seems like a huge process just to remove a suspended email from a list. I can't seem to work your example in to my application. Please see the attached screen shot of what I have so far.

 

post-1758-0-73492600-1317295041_thumb.jpg

Thanks again.

 

 

I have it working but not sure if this is a good way to do it or not. Thanks.

Update:post-1758-0-49402100-1317372810_thumb.jpg

 

 

 

Disregard guys I think I got it working ;) Thanks!

Link to post
Share on other sites
  • 1 year later...

wont this not work though if you are using multi threads? lets say you got 5 threads running... and 1 account is suspended so you remove item and then decrement.. but by that point the other threads have already pulled different accounts. Wouldnt that mess up the order?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...