Results 1 to 3 of 3

Thread: File Question ... Lines

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 1999
    Location
    Phoenix, az
    Posts
    1,517
    HI,

    More File Questions..

    How can I write to a line...

    Like

    Dim strtxt1 as string

    line1 of C:\win\dir.enc = strtxt1

    how do you do that?

    and Getting a line!

    strtxt1 = line1 of Dir.enc

  2. #2
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    I'm pretty sure that if you make it 1 string that its for 1 word, but then again I'm only 50% sure, but you can do:



    Code:
    on error resume next
    open "c:\win\dir.enc" for input as #1
    input #1, text1.text
    close #1
    
    open "c:\win\dir.enc" for output as #2
    Print #2, "your stuff" & " " & vbnewline & " " & text1.text
    close #2
    it might work, might not
    NXSupport - Your one-stop source for computer help

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Use Lineinput to input a line from a file and don't open in output, it will erase the whole file.

    I suggest you could have a look on my file tutorial, on my homepage
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

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



Click Here to Expand Forum to Full Width