Results 1 to 3 of 3

Thread: [RESOLVED] streamwrite FileMode

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    Resolved [RESOLVED] streamwrite FileMode

    Hi,
    Using the streamwrite to output a text file I use FileMode.Create to create a new file .
    BUT
    I would like to create a new file each time so that every time the code is run, a new file is added to the folder.
    At present there is always only one file.
    I even tried FileMode.Append, FileMode.CreateNew but none of them do what I am after.
    Thanks

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: streamwrite FileMode

    Do you give each file a new and unique name?

    What code are you currently running?

  3. #3
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [RESOLVED] streamwrite FileMode

    If you dont give the file a unique name, it will overwrite the existing file.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

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