Truncate/Remove Last Characters in NotePad?

kwakuo

Junior Member
Joined
Nov 21, 2010
Messages
196
Reaction score
41
Hey folks,

I just created some accounts with TAAC and exported them to Notepad but they all have "|" after the passwords. Anyone know of any formula i can use to remove those last "|" characters? I can't go thro' them all removing them one at a time.

Any help appreciated.
 
Hey folks,

I just created some accounts with TAAC and exported them to Notepad but they all have "|" after the passwords. Anyone know of any formula i can use to remove those last "|" characters? I can't go thro' them all removing them one at a time.

Any help appreciated.

Mind showing me the format of one of those files?
 
Hey folks,

I just created some accounts with TAAC and exported them to Notepad but they all have "|" after the passwords. Anyone know of any formula i can use to remove those last "|" characters? I can't go thro' them all removing them one at a time.

Any help appreciated.

Why can't you just replace the pipe with space? Find replace will do the trick. If it's pipe deliminated, take it to excel and export it out. That'll work too.

If all else fails get textpad and record a macro. Record this:
Put the cursor at the beginning of the first line, press the END button, click backspace, then down arrow.

Playback macro till end of file.
 
How about?

Code:
    class Program
    {
        const string path = "C:/Users/Arco/Desktop/Accounts/";

         static string[] fileEntries = Directory.GetFiles(path);

        static void Main(string[] args)
        {
            foreach (string fi in fileEntries)
            {
                string Text = String.Empty;
                using (StreamReader i = new StreamReader(fi))
                {
                    
                    Text = i.ReadToEnd().Replace("|", "") ;
                    File.Delete(fi);
                    File.Create(fi);
                    using (StreamWriter s = new StreamWriter(fi))
                    {
                        s.Write(Text);
                        s.Flush();
                        s.Close();
                    }
                }
            }
            Console.ReadLine();
        }
    }
 
Do this.

1. Cope the "|"
2. Go to replace.
3. In find, put the "|".
4. In a new notepad doc, make a new line, select all, and copy
5. Paste in replace with.
6. Replace all!
 
It saves it in this format:

myusername|password|

So just using notepad to replace "|" with space/nothing will also replace the "|" before the password. Its just only the last "|" (pipes) i want out


am gona try all the suggestions and see what works easier. Thanks guys.
 
Last edited:
Why not use text in column with excel?

Actually I read again

Use edit on notepad and remove them or download pspad
 
It saves it in this format:

myusername|password|

So just using notepad to replace "|" with space/nothing will also replace the "|" before the password.


am gona try all the suggestions and see what works easier. Thanks guys.


Replace "|\n" with "\n". (\n means newline)

I did something just like that yesterday using TextPad.
 
It saves it in this format:

myusername|password|

So just using notepad to replace "|" with space/nothing will also replace the "|" before the password. Its just only the last "|" (pipes) i want out


am gona try all the suggestions and see what works easier. Thanks guys.

How about this then?
Code:
 class Program
    {
        const string path = "C:/Users/Arco/Desktop/Accounts/";

        static string[] fileEntries = Directory.GetFiles(path);

        static void Main(string[] args)
        {
            foreach (string fi in fileEntries)
            {
                string Text = String.Empty;
                using (StreamReader i = new StreamReader(fi))
                {

                    Text = i.ReadToEnd();
                    Text = Text.Remove(Text.Length - 1);
                    File.Delete(fi);
                    File.Create(fi);
                    using (StreamWriter s = new StreamWriter(fi))
                    {
                        s.Write(Text);
                        s.Flush();
                        s.Close();
                    }
                }
            }
            Console.ReadLine();
        }
    }
 
Give notepad++ a chance. open source.. just google for it. can't remember exactly but I think that there was a possibility to delete the last character of each line.

cheers,
Chris
 
Back
Top