Results 1 to 5 of 5

Thread: Edit Text File From Cmd

  1. #1
    Senior Member crazyfool's Avatar
    Join Date
    Jan 2008
    Posts
    761
    Thanks
    77
    Thanked
    38 times in 38 posts
    • crazyfool's system
      • Motherboard:
      • Striker Extreme
      • CPU:
      • Q6600
      • Memory:
      • OCZ 6400 2 x 2GB
      • Storage:
      • Samsung Spinpoint 500GB
      • Graphics card(s):
      • BFG 8800 GT OC 512MB
      • PSU:
      • Coolermaster Real Power Pro 850w
      • Case:
      • Coolermaster CM-690
      • Operating System:
      • XP, Vista, Windows 7 & Ubuntu
      • Monitor(s):
      • Samsung 2232BW

    Edit Text File From Cmd

    hey guys,
    This might sound like a werid request but what I want to do it be able to write a batch file that will remove 6 lines from a text file. The reason is that I grab my freeview epg from the signal but since the retune the epg now has 2 channels with no name which for some reason means mediaportal won't import any of the epg. So what I need to do is remove these channels from the file every time I grab it. I grab the epg using the a batch file so I thought maybe its possible to add some text editing to it. If not does anyone know a way to do this automatically this using some other app.
    Thanks.

  2. #2
    Jay
    Jay is offline
    Gentlemen.. we're history Jay's Avatar
    Join Date
    Aug 2006
    Location
    Jita
    Posts
    8,365
    Thanks
    304
    Thanked
    568 times in 409 posts

    Re: Edit Text File From Cmd

    do the 6 lines always have the same text?

    If so I think some VBS could do this for you no problem.
    Last edited by Jay; 06-10-2009 at 02:15 PM.
    □ΞVΞ□

  3. #3
    Get in the van. Fraz's Avatar
    Join Date
    Aug 2007
    Location
    Bristol
    Posts
    2,919
    Thanks
    284
    Thanked
    397 times in 231 posts
    • Fraz's system
      • Motherboard:
      • Gigabyte X58A-UD5
      • CPU:
      • Watercooled i7-980X @ 4.2 GHz
      • Memory:
      • 24GB Crucial DDR3-1333
      • Storage:
      • 240 GB Vertex2E + 2 TB of Disk
      • Graphics card(s):
      • Water-cooled Sapphire 7970 @ 1175/1625
      • PSU:
      • Enermax Modu87+
      • Case:
      • Corsair 700D
      • Operating System:
      • Linux Mint 12 / Windows 7
      • Monitor(s):
      • Dell 30" 3008WFP and two Dell 24" 2412M
      • Internet:
      • Virgin Media 60 Mbps

    Re: Edit Text File From Cmd

    edlin might be what you want:

    http://www.computerhope.com/edlin.htm

    it can delete a range of lines and is possibly the oldest component of windows...

    Edit: Actually, it looks like a load of serious poo.
    Last edited by Fraz; 06-10-2009 at 02:35 PM.

  4. #4
    Banhammer in peace PeterB kalniel's Avatar
    Join Date
    Aug 2005
    Posts
    30,748
    Thanks
    1,787
    Thanked
    3,286 times in 2,647 posts
    • kalniel's system
      • Motherboard:
      • Gigabyte Z390 Aorus Ultra
      • CPU:
      • Intel i9 9900k
      • Memory:
      • 32GB DDR4 3200 CL16
      • Storage:
      • 1TB Samsung 970Evo+ NVMe
      • Graphics card(s):
      • nVidia GTX 1060 6GB
      • PSU:
      • Seasonic 600W
      • Case:
      • Cooler Master HAF 912
      • Operating System:
      • Win 10 Pro x64
      • Monitor(s):
      • Dell S2721DGF
      • Internet:
      • rubbish

    Re: Edit Text File From Cmd

    Find

    find "keyword" < ''inputfilename'' > ''outputfilename''

    searches for a text string in a file or files.

    Find [/v] [/c] [/n] [/i] "string" [[drive:][path]filename[ ...]]

    /v displays all lines not containing the specified string.
    /c displays only the count of lines containing the string.
    /n displays line numbers with the displayed lines.
    /i ignores the case of characters when searching for the string.
    "string" specifies the text string to find.
    [drive:][path]filename specifies a file or files to search.

    If a pathname is not specified, find searches the text typed at the prompt
    or piped from another command.

  5. #5
    Senior Member crazyfool's Avatar
    Join Date
    Jan 2008
    Posts
    761
    Thanks
    77
    Thanked
    38 times in 38 posts
    • crazyfool's system
      • Motherboard:
      • Striker Extreme
      • CPU:
      • Q6600
      • Memory:
      • OCZ 6400 2 x 2GB
      • Storage:
      • Samsung Spinpoint 500GB
      • Graphics card(s):
      • BFG 8800 GT OC 512MB
      • PSU:
      • Coolermaster Real Power Pro 850w
      • Case:
      • Coolermaster CM-690
      • Operating System:
      • XP, Vista, Windows 7 & Ubuntu
      • Monitor(s):
      • Samsung 2232BW

    Re: Edit Text File From Cmd

    thanks for the help guys...find didn't to want to work for me for some reason however I wrote an autoit script to do the job...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 24-07-2009, 04:12 PM
  2. File, Edit, View, Tools in Vista
    By Zak33 in forum General Discussion
    Replies: 12
    Last Post: 19-05-2009, 06:48 PM
  3. Windows 7 ISO question
    By Andy14 in forum Software
    Replies: 21
    Last Post: 09-02-2009, 07:00 PM
  4. Problem with Nero
    By deathsith in forum Help! Quick Relief From Tech Headaches
    Replies: 2
    Last Post: 15-06-2007, 09:24 AM
  5. Open Office Writer - Header Numbering
    By ajbrun in forum Software
    Replies: 3
    Last Post: 07-05-2007, 12:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •