[HELP] writing to the bottom of a text file menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    SacredSpenny's Avatar Contributor CoreCoins Purchaser
    Reputation
    229
    Join Date
    Dec 2007
    Posts
    647
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [HELP] writing to the bottom of a text file

    Well im making a program that reads a settings file defaulted on windows XP to figure out some information and show the user.

    But im trying to figure out how to write a line of text like "//Displayed by BazzleStag" at the bottom of the settings file,

    So is there a way to write a string of text to the bottom line of a .ini or .txt without disturbing the other information in the file?

    [HELP] writing to the bottom of a text file
  2. #2
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    C# code out of laziness; run it through a converter (done in the browser, so may be issues)

    Code:
    public static void AppendLine(string fileName, string line)
    {
    using (TextWriter tw = new StreamWriter(fileName, true))
    {
    tw.WriteLine(Environment.NewLine + line);
    }
    }

  3. #3
    SacredSpenny's Avatar Contributor CoreCoins Purchaser
    Reputation
    229
    Join Date
    Dec 2007
    Posts
    647
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apoc that makes no sense to me, and theres no where to put a file?

  4. #4
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bazzle, I sent you a PM with vb.net code in it when you asked in the bawx. Read it, and use it.

  5. #5
    uselessx's Avatar Active Member
    Reputation
    38
    Join Date
    Mar 2007
    Posts
    79
    Thanks G/R
    3/9
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Dim f, fs
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.OpenTextFile("C:\example.txt", 8, -2)
    f.Write ("//Displayed by BazzleStag")
    f.Close

Similar Threads

  1. help: writing text to ui element
    By iamclint in forum Diablo 3 Memory Editing
    Replies: 0
    Last Post: 12-16-2012, 08:04 PM
  2. Help me find the model :D
    By ven in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 04-10-2007, 03:16 AM
  3. HELP: [Leggings of the Ursa] blp file!
    By mmowns in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 01-14-2007, 05:04 PM
  4. Removing the bottom half of TABARDs :-)
    By Toldorn in forum WoW ME Questions and Requests
    Replies: 9
    Last Post: 01-04-2007, 08:10 AM
  5. World of Warcraft helps women across the world!!
    By Örpheus in forum World of Warcraft General
    Replies: 4
    Last Post: 09-07-2006, 01:52 PM
All times are GMT -5. The time now is 07:13 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search