Results 1 to 5 of 5

Thread: FileCopy To A:\

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Location
    Malaysia
    Posts
    124

    FileCopy To A:\

    Hi, My backup process is Filecopy(sourceFile, Adrive), but if the file's capacity is over 1.44mb the system won't be able to operate this function. Is there any other solution? e.g How do i copy a 5 mb file into separate diskettes?

  2. #2
    Member
    Join Date
    May 2002
    Location
    Malaysia
    Posts
    45
    you can try to use the Filestream instead of filecopy to load the file and chop it to few byte array and store into different diskete

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Location
    Malaysia
    Posts
    124
    Could you please show me the code? Because i don't really know how's the filestream is use.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Location
    Malaysia
    Posts
    124

    From ProgrammersHeaven.com

    Step1: I use File stream and StreamWriter objects.
    Step2: I create a buffer of 1.3MB or as is available and fill this
    buffer with data and then flush it to floppy. I then Close above
    objects and file names given on Floppy start with *.001 so that
    you can go upto 999 floppies.
    Step3 : I recreate above objects and seek to the last position written+1
    to start writing on next floppy.
    Step4: For the Last floppy, I create an additional file storing just
    No. of Floppies=7(say) and thats all.

    I have another program which is just a mirror copy of above program in which I use StreamReader to read the data.

    It has worked successfully upto 27 floppies(that is what I have tried)
    Hope this gives you some help.

    A word of caution: Now a days floppies are not that reliable. So why not use CD-Writer and completely get out of this program!

    ->the above solution is provided by the programmersheavan.com, but i really don't know how to use the filestream method, can anyone tell me how to do above solution by provide with a sample coding, i will appreciate your kindness. Thank you.

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    This totutrial for that job ......have fun !

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