Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. how to solve zipe files with space ? [modified]

how to solve zipe files with space ? [modified]

Scheduled Pinned Locked Moved Visual Basic
helpcsharplinuxtutorial
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Golden Jing
    wrote on last edited by
    #1

    Dear all, I use VB 2005 with shell comman for zip file. my task for zip is with space of folder name and file. So when i zip them. it was not successfull. It causes of space. that my source code: shell("C:\Program Files\WinZip\WZZIP.EXE -u D:\Ready Sent\File1.zip D:\Source File\File Send.PDF") Do you have any solve of this issue ? Thanks for your help...

    VB.Net

    modified on Friday, January 1, 2010 6:25 AM

    D A 2 Replies Last reply
    0
    • G Golden Jing

      Dear all, I use VB 2005 with shell comman for zip file. my task for zip is with space of folder name and file. So when i zip them. it was not successfull. It causes of space. that my source code: shell("C:\Program Files\WinZip\WZZIP.EXE -u D:\Ready Sent\File1.zip D:\Source File\File Send.PDF") Do you have any solve of this issue ? Thanks for your help...

      VB.Net

      modified on Friday, January 1, 2010 6:25 AM

      D Offline
      D Offline
      DaveAuld
      wrote on last edited by
      #2

      Why did you delete your message previously asked and then create this new post? you should have edited your original question and added the additional info. Have you tried enclosing the path/filename statements in quotation marks? the interpreter is probably failing on the spaces.

      shell(""""C:\Program Files\WinZip\WZZIP.EXE -u D:\Ready Sent\File1.zip D:\Source File\File Send.PDF"""")

      or split it up further for each parmater like:

      shell(""""C:\Program Files\WinZip\WZZIP.EXE -u""" """D:\Ready Sent\File1.zip""" """D:\Source File\File Send.PDF"""")

      Dave Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

      G 1 Reply Last reply
      0
      • D DaveAuld

        Why did you delete your message previously asked and then create this new post? you should have edited your original question and added the additional info. Have you tried enclosing the path/filename statements in quotation marks? the interpreter is probably failing on the spaces.

        shell(""""C:\Program Files\WinZip\WZZIP.EXE -u D:\Ready Sent\File1.zip D:\Source File\File Send.PDF"""")

        or split it up further for each parmater like:

        shell(""""C:\Program Files\WinZip\WZZIP.EXE -u""" """D:\Ready Sent\File1.zip""" """D:\Source File\File Send.PDF"""")

        Dave Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

        G Offline
        G Offline
        Golden Jing
        wrote on last edited by
        #3

        ohh becuase the first is similar the new one so i delete. ohh i tryed follow that your code shell(""""C:\Program Files\WinZip\WZZIP.EXE -u""" """D:\Ready Sent\File1.zip""" """D:\Source File\File Send.PDF"""") but it sitll can not work and get that syntax error. what about problem ?

        VB.Net

        D 1 Reply Last reply
        0
        • G Golden Jing

          ohh becuase the first is similar the new one so i delete. ohh i tryed follow that your code shell(""""C:\Program Files\WinZip\WZZIP.EXE -u""" """D:\Ready Sent\File1.zip""" """D:\Source File\File Send.PDF"""") but it sitll can not work and get that syntax error. what about problem ?

          VB.Net

          D Offline
          D Offline
          DaveAuld
          wrote on last edited by
          #4

          have you tried to get it to work from the command line first? then copy the string into the code. Alternatively, have you tried passing the argument in as a parameter of the process.start method instead of using shell.

          Process.Start("C:\Program Files\WinZip\WZZIP.EXE", "-u D:\Ready Sent\File1.zip D:\Source File\File Send.PDF")

          Dave Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

          G 1 Reply Last reply
          0
          • D DaveAuld

            have you tried to get it to work from the command line first? then copy the string into the code. Alternatively, have you tried passing the argument in as a parameter of the process.start method instead of using shell.

            Process.Start("C:\Program Files\WinZip\WZZIP.EXE", "-u D:\Ready Sent\File1.zip D:\Source File\File Send.PDF")

            Dave Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

            G Offline
            G Offline
            Golden Jing
            wrote on last edited by
            #5

            try your code but it is still not support with space. Process.Start("C:\Program Files\WinZip\WZZIP.EXE", "-u D:\Ready Sent\File1.zip D:\Source File\File Send.PDF") i add -yp it shows that: Warning: name not matched: Sent/File1.zip Warning: name not matched: D:/Source Warning: name not matched: File/File Warning: name not matched: Send.PDF Warning: D:\Ready.zip not found or empty Error: No files were found for this action that match your criteria - nothing to do. what about that problem ? Can you give me example ? or any else for solve that?

            VB.Net

            1 Reply Last reply
            0
            • G Golden Jing

              Dear all, I use VB 2005 with shell comman for zip file. my task for zip is with space of folder name and file. So when i zip them. it was not successfull. It causes of space. that my source code: shell("C:\Program Files\WinZip\WZZIP.EXE -u D:\Ready Sent\File1.zip D:\Source File\File Send.PDF") Do you have any solve of this issue ? Thanks for your help...

              VB.Net

              modified on Friday, January 1, 2010 6:25 AM

              A Offline
              A Offline
              Alan N
              wrote on last edited by
              #6

              Hi, If this were running from the DOS prompt the command line would be

              "C:\Program Files\WinZip\WZZIP.EXE" -u "D:\Ready Sent\File1.zip D:\Source File\File Send.PDF"

              Providing the correct VB escaping for the quote characters gives

              shell("""C:\Program Files\WinZip\WZZIP.EXE"" -u ""D:\Ready Sent\File1.zip D:\Source File\File Send.PDF""")

              I think! [EDIT] Ah, didn't spot the multiple filenames Try this

              shell("""C:\Program Files\WinZip\WZZIP.EXE"" -u ""D:\Ready Sent\File1.zip"" ""D:\Source File\File Send.PDF""")

              Alan.

              modified on Friday, January 1, 2010 12:19 PM

              G 1 Reply Last reply
              0
              • A Alan N

                Hi, If this were running from the DOS prompt the command line would be

                "C:\Program Files\WinZip\WZZIP.EXE" -u "D:\Ready Sent\File1.zip D:\Source File\File Send.PDF"

                Providing the correct VB escaping for the quote characters gives

                shell("""C:\Program Files\WinZip\WZZIP.EXE"" -u ""D:\Ready Sent\File1.zip D:\Source File\File Send.PDF""")

                I think! [EDIT] Ah, didn't spot the multiple filenames Try this

                shell("""C:\Program Files\WinZip\WZZIP.EXE"" -u ""D:\Ready Sent\File1.zip"" ""D:\Source File\File Send.PDF""")

                Alan.

                modified on Friday, January 1, 2010 12:19 PM

                G Offline
                G Offline
                Golden Jing
                wrote on last edited by
                #7

                Dear Alan yes it runs DOS. i tryed like your code and add -yp for showing DOS message: Shell("""C:\Program Files\WinZip\WZZIP.EXE"" -yp -u ""D:\Ready Sent\File1.zip D:\Source File\File Send.PDF""") the message showed that: Warning: D:\Ready Sent\File1.zip D:\Source File\File Send.PDF not found or empty Error: Could not creat output file Do you have any idea or solving else ?

                VB.Net

                A 1 Reply Last reply
                0
                • G Golden Jing

                  Dear Alan yes it runs DOS. i tryed like your code and add -yp for showing DOS message: Shell("""C:\Program Files\WinZip\WZZIP.EXE"" -yp -u ""D:\Ready Sent\File1.zip D:\Source File\File Send.PDF""") the message showed that: Warning: D:\Ready Sent\File1.zip D:\Source File\File Send.PDF not found or empty Error: Could not creat output file Do you have any idea or solving else ?

                  VB.Net

                  A Offline
                  A Offline
                  Alan N
                  wrote on last edited by
                  #8

                  Hi, See my corrected modified post. Alan.

                  G 1 Reply Last reply
                  0
                  • A Alan N

                    Hi, See my corrected modified post. Alan.

                    G Offline
                    G Offline
                    Golden Jing
                    wrote on last edited by
                    #9

                    Thanks you so much Alan your suport. It is still warning that -> Warning D:Ready Sent\File1.zip not found or empty Adding VB.Net

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups