Results 1 to 6 of 6

Thread: File Handling

  1. #1

    Thread Starter
    Junior Member ravi_sekhar's Avatar
    Join Date
    Jan 2002
    Posts
    31

    Angry File Handling

    Hi,
    I want to open a text file in Read-write mode is it possible in VB???

    Cheer's
    Ravi.

  2. #2

    Thread Starter
    Junior Member ravi_sekhar's Avatar
    Join Date
    Jan 2002
    Posts
    31

    Sorry.......

    Sorry Sorry i have posted it in wrong forum. I realised it after posting it. Sorry, but if in any one knows the answer do help me. Thank u...

  3. #3
    New Member
    Join Date
    Feb 2002
    Posts
    13

    oh yes u can!

    There is the FSO or file system object used for opening any file and read /write into it.

    dim fso as new filesystemobject
    dim txtfile as file
    dim txtstream as textstream

    set txtfile=fso.getfile("c:\..........") 'enter the path of the file
    'u wanna read

    set txtstream =txtfile.openastextstream(for reading)
    do until txtstream.atendofstream
    txtstream.readline



    ps:-referance-microsoft scripting runtime

  4. #4

    Thread Starter
    Junior Member ravi_sekhar's Avatar
    Join Date
    Jan 2002
    Posts
    31

    Thank u

    Thank u For that but can i know how to write or better where can i good info on that..

  5. #5
    New Member
    Join Date
    Feb 2002
    Posts
    13

    check out this link n try out the code given!


  6. #6
    Member
    Join Date
    Aug 2001
    Location
    Washington DC
    Posts
    63
    you could open the file as binary or random and use the put and get methods.

    Although tedious, it is open for read and write simultaneously.

    Hope this helps.
    Cedric

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