Results 1 to 6 of 6

Thread: Making a file out of a....

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    10

    Making a file out of a....

    I have a problem, Im making this utility where it takes a folder and compresses it into a file (.pbo) with all of its subdirectorys too, i have tryed many things. If you dont understand what im saying, jsut say u dont understand and ill try to explain it better.

  2. #2
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919
    so your trying to take every file in a folder and put it into one file?

    zip?
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    10
    yes, but i want it into a file with the extension pbo

  4. #4
    Addicted Member njnets's Avatar
    Join Date
    Aug 2002
    Posts
    206
    I'm guessing here...try creating the empty file and then putting the actual file into it.

    VB Code:
    1. Open C:\file.pbo For Output As #1
    2. Print #1, ""
    3. Close #1
    4.  
    5. 'put file into hollow file

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    10
    Hwo do i unpack it?

  6. #6
    Addicted Member
    Join Date
    Jul 2002
    Posts
    234
    You could write your own compression algorithem and uncompression algorithem to do what your asking. I've actually done this quite a few times, but never in VB (in my opinion, VB is poorly suited for this task...especially if the algorithem is fairly intensive). But what you might consider doing is utilizing Window's built in compression routines. By using a simple runtime, you can create CAB files in Windows. What you could do with this then, is just create a CAB file and then re-name the extension. There is a project on planet-source that shows how to create CAB files. Please see:
    http://www.planet-source-code.com/vb...11200&lngWId=1

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