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
  1. Home
  2. General Programming
  3. C#
  4. How can Zip a folder an runtime

How can Zip a folder an runtime

Scheduled Pinned Locked Moved C#
question
8 Posts 4 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.
  • A Offline
    A Offline
    Amir Jalaly
    wrote on last edited by
    #1

    Hi i want to zip a file or folder at runtime . is there a command for running to zip a folder in windows ? ( i have win XP so i think must there is a command for this work ) Regards' Amir jalaly

    R 1 Reply Last reply
    0
    • A Amir Jalaly

      Hi i want to zip a file or folder at runtime . is there a command for running to zip a folder in windows ? ( i have win XP so i think must there is a command for this work ) Regards' Amir jalaly

      R Offline
      R Offline
      Rob Graham
      wrote on last edited by
      #2

      Although XP has the ability to READ zip files and display them like they were directories, I don't beleive it has the ability to create them. There are a number of open source librarys like this one[^] that provide some zip creation support. Anger is the most impotent of passions. It effects nothing it goes about, and hurts the one who is possessed by it more than the one against whom it is directed. Carl Sandburg

      L 1 Reply Last reply
      0
      • R Rob Graham

        Although XP has the ability to READ zip files and display them like they were directories, I don't beleive it has the ability to create them. There are a number of open source librarys like this one[^] that provide some zip creation support. Anger is the most impotent of passions. It effects nothing it goes about, and hurts the one who is possessed by it more than the one against whom it is directed. Carl Sandburg

        L Offline
        L Offline
        Larsenal
        wrote on last edited by
        #3

        Rob Graham wrote: I don't beleive it has the ability to create them You might be happy to try... Right click File or Folder. Send To -> Compressed (zipped) Folder

        R D 2 Replies Last reply
        0
        • L Larsenal

          Rob Graham wrote: I don't beleive it has the ability to create them You might be happy to try... Right click File or Folder. Send To -> Compressed (zipped) Folder

          R Offline
          R Offline
          Rob Graham
          wrote on last edited by
          #4

          That makes a compressed NTFS folder, not a zip file.... Anger is the most impotent of passions. It effects nothing it goes about, and hurts the one who is possessed by it more than the one against whom it is directed. Carl Sandburg

          L 1 Reply Last reply
          0
          • R Rob Graham

            That makes a compressed NTFS folder, not a zip file.... Anger is the most impotent of passions. It effects nothing it goes about, and hurts the one who is possessed by it more than the one against whom it is directed. Carl Sandburg

            L Offline
            L Offline
            Larsenal
            wrote on last edited by
            #5

            Is this information incorrect then? http://www.windowsnetworking.com/kbase/WindowsTips/WindowsXP/UserTips/Miscellaneous/CompressedZippedversusCompressionFoldersinXP.html The article says that MSFT has used code based on WinZip7.

            R 1 Reply Last reply
            0
            • L Larsenal

              Rob Graham wrote: I don't beleive it has the ability to create them You might be happy to try... Right click File or Folder. Send To -> Compressed (zipped) Folder

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              Wont work. All you need to do is create a new Text file on the Desktop or where ever you need in the file system, then rename it with a .ZIP extension. You can then drag and drop all the files you want into the new .ZIP. I don't know how to get this to work in code though. For backward compatibility with Windows 2000/NT, you might want to try the #ziplib[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

              L 1 Reply Last reply
              0
              • L Larsenal

                Is this information incorrect then? http://www.windowsnetworking.com/kbase/WindowsTips/WindowsXP/UserTips/Miscellaneous/CompressedZippedversusCompressionFoldersinXP.html The article says that MSFT has used code based on WinZip7.

                R Offline
                R Offline
                Rob Graham
                wrote on last edited by
                #7

                My Bad! You appear to be correct. so the answer to the original request is....? Anger is the most impotent of passions. It effects nothing it goes about, and hurts the one who is possessed by it more than the one against whom it is directed. Carl Sandburg

                1 Reply Last reply
                0
                • D Dave Kreskowiak

                  Wont work. All you need to do is create a new Text file on the Desktop or where ever you need in the file system, then rename it with a .ZIP extension. You can then drag and drop all the files you want into the new .ZIP. I don't know how to get this to work in code though. For backward compatibility with Windows 2000/NT, you might want to try the #ziplib[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                  L Offline
                  L Offline
                  Larsenal
                  wrote on last edited by
                  #8

                  You're right... I was just responding to the notion that WinXP has no support for creating (actual) ZIP files.

                  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