(2nd Post) BASIC programming advice needed: PKWARE'S compression utilities front end application - PROGRAMMING PROJECT 
Author Message
 (2nd Post) BASIC programming advice needed: PKWARE'S compression utilities front end application - PROGRAMMING PROJECT

[ advice.txt 8K ]

        This is my second posting of this article.  I apologize to all, if you
        had the misfortune of reading my first posting.

        I had a {*filter*} of a time with text formatting, not to mention, this is my
        first attempt at posting an article to a news group.  Again, I apologize.
        Enough groveling.

        My reason for posting this article... I need some help from a
        knowledgeable BASIC programmer.

        At the present time I'm using a shareware BASIC compiler - ASIC Version
        5.0 produced by the 80/20 Software Company, in addition, I'm also using
        ASILIB Version 2.0 library of functions.

        I'd like to create a front-end application for PKWARE'S compression
        utilities (PKZIP, PKUNZIP, ZIP2EXE, PKZIPFIX, PKLITE, etc....).

        My question is a logic question, I believe.

        I want PKWARE'S compression utilities normal screen output to be
        transparent to the end user in the application I am attempting to build,
        that is, I don't want the user to see PKWARE'S normal screen output.  I
        want to process PKWARE'S normal screen output messages internally within
        my application and display it in a concise and attractive manner in my
        application, similar to ZIP-R-PRO for DOS, or similar PKWARE front-end
        utility.

        Just so there's no misunderstanding, I'll go into a little more detail.

        PKWARE'S compression utilities echo to the DOS screen whatever task is
        being carried out at that moment in time, for example:

            *   During compression or decompression of an archive, PKWARE'S
                compression utilities echo to the screen the name of the file
                being compressed or decompressed at that moment in time.

            *   PKWARE'S compression utilities may prompt the user for input.

                Example:  If during decompression of an archive, a particular
                          file within the archive is named the same name as a
                          file contained within the directory being used to
                          decompress the archived files into, PKUNZIP utility
                          will prompt the user for input with several options:

                         (1) to overwrite the file in the current directory
                             with the archived file named by the same name
                         (2) to skip the archived file in question and continue
                             with the next file contained within the archive
                         (3) to rename the archived file by another name
                         (4) or to overwrite all files in the current directory
                             that might be named the same as a file contained
                             within the archive.  If this option is chosen, the
                             user will not be prompted again, all occurrences
                             of duplicate named files will be overwritten in
                             the current directory

            *   PKWARE'S compression utilities will echo to the screen an error
                message if an error is encountered during compression or decomp-
                ression of an archive.

            *   PKWARE'S compression utilities will prompt the user to change
                diskettes if the archive was/is being compressed with the
                spanning option.

        Now that I have described to you the challenge that I'm facing, let me
        tell where my head is at the moment.  My logic may be totally
        unacceptable to an experienced BASIC programmer, but, let me bounce it
        off of you and see what you think.  This is where I show the entire
        world my ignorance as to the most efficient method of solving a problem
        using BASIC.

        THE PLAN:  (as I see it)
        ========
                I know a little bit about using redirection and piping in MSDOS.

                Obtuse Example: (This is it world)

                  *   My thinking is that from within the application I'm
                      attempting to build, the user desires to decompress an
                      archive, for example, an archive by the name A:\GAMES.ZIP
                      to a directory on his/her hard drive.

                  *   Here's the logic... I shell to DOS - transparent to the
                      end user, of course, and I issue the command:

                          SHELL "PKUNZIP -v B:\GAMES.ZIP > C:\ZIPINFO.TXT"

                      This command will redirect the normal screen output of
                      PKUNZIP, in this case, executing PKUNZIP with the (-v)
                      option, to view a listing of the files contained within
                      the archive and to store the normal screen output in a
                      temporary sequential file name C:\ZIPINFO.TXT.  The
                      normal screen output displays the filename of each file
                      contained within archive and other pertinent information,
                      such as, method of compression, compression ratio, date,
                      time, etc.

                  *   Now, I read in the sequential file character by character,
                      locating the filenames of the files contained within the
                      archive and I store those filenames in a string array.

                  *   Next, I want to be able to display to the end user what is
                      occurring at any given time during the decompression
                      process.  So, I figure that I'll have to decompress each
                      file individually and redirect the normal screen output to
                      a temporary sequential file.

                      Let's say that the first file in the archive to be
                      decompressed is named TETRIS.EXE

                      So, I shell to DOS again and issue the command:

              SHELL "PKUNZIP -d B:\GAMES.ZIP\TETRIS.EXE C:\GAMES > C:\UNCOMP.TXT"

                      This command will decompress the file TETRIS.EXE into
                      C:\GAMES directory and redirect the normal screen output
                      to a temporary sequential file name C:\UMCOMP.TXT.

                      Next, I read in the sequential file character by character
                      like I did earlier, process and display the information to
                      the end user from within my application.

                      Needless to say this last command is repeated for each file
                      in the archive.  I suppose I could handle error messages in
                      the same manner.

                      *  Note:
                                I don't believe redirecting the output to a
                                temporary sequential file will work if one of
                                PKWARE'S utilities prompts the user for input.

                                I'm having difficulty comprehending the idea of
                                redirecting input for a PKWARE utility from a
                                sequential file.  Any insight into redirecting
                                input would be appreciated.

                      ** Note:
                                I've read in the PKWARE documentation about
                                GENERATING A LIST FILE.  I don't know if that
                                might be a solution to my dilemma or not.  If
                                you have knowledge about list files please
                                enlighten me.

        The torch is passed:
        ===================

                Well, you know the challenge that confronts me.  I'm  hoping
                that there's a much simpler remedy to my problem than
                redirecting the normal screen output to a temporary
                sequential file, processing the information and displaying
                the information to the end user in my application.

                Your prompt solution, advice or ideas is greatly appreciated.

        Best wishes,

        T.G.

        Make attachment to this article or e-mail me direct.




Sat, 14 Nov 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. PKWARE-Data-Compression-Library does'nt work with VB5

2. Programming Visual Basic .NET 2nd Edition (O'Reilly) Released

3. ?? PKWARE data compression libraries for DOS

4. PKWARE data compression libraries for DOS

5. PKWARE Data Compression Library (DCL) in VB

6. Help with Pkware Data Compression library

7. PKWARE Data Compression Library

8. Need Help With A Basic Program (ignore previous post) - Towercam.ba

9. Need Help With A Basic Program (ignore previous post) - Towercam.bas (0/1)

10. Need Help With A Basic Program (ignore previous post) - Towercam.bas (1/1)

11. Audio Programming and Serial Port programming advice needed.

12. Utility to watch program calls to dll's

 

 
Powered by phpBB® Forum Software