Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
student:zip:creating [2018/08/20 11:28] – created bernstdhstudent:zip:creating [2022/08/29 11:36] (current) bernstdh
Line 9: Line 9:
  
 To create a ''%%.zip%%'' file from the File manager: To create a ''%%.zip%%'' file from the File manager:
- 
  
   - Navigate to the appropriate directory/folder.   - Navigate to the appropriate directory/folder.
-  - Click on the first file to select it. +  - Click on the first file or directory/folder to select it. 
-  - Control-click on any other files to select them.+  - Control-click on any other files or directories/folders to select them.
   - Right-click on one of the selected files and pull down to <key>Compress...</key>.   - Right-click on one of the selected files and pull down to <key>Compress...</key>.
   - Enter a filename (and location).   - Enter a filename (and location).
   - Select <key>.zip</key>.   - Select <key>.zip</key>.
   - Click on <key>Create</key>.   - Click on <key>Create</key>.
 +
 To create a ''%%.zip%%'' file from the command shell, you can use the following command: To create a ''%%.zip%%'' file from the command shell, you can use the following command:
  
-  |   zip //archive//.zip //file// [//file//]...  | 
  
 +|   zip //archive//.zip //file// [//file//]...   |
  
 ==== Using MS Windows ==== ==== Using MS Windows ====
Line 30: Line 30:
  
   - Navigate to the appropriate directory/folder.   - Navigate to the appropriate directory/folder.
-  - Click on the first file to select it. +  - Click on the first file to or directory/folder to select it. 
-  - Control-click on any other files to select them.+  - Control-click on any other files or directories/folders to select them.
   - Right-click on one of the selected files and pull down to <key>Send To</key> and pull down to <key>Compressed (zipped) Folder</key>.   - Right-click on one of the selected files and pull down to <key>Send To</key> and pull down to <key>Compressed (zipped) Folder</key>.
 +
 If the Java Development Kit is installed and in your PATH, you   can also create a ''%%.zip%%'' file from the command shell   using the following command: If the Java Development Kit is installed and in your PATH, you   can also create a ''%%.zip%%'' file from the command shell   using the following command:
  
-  |   jar -cvf //archive//.zip //file// [//file//]...     |+|   jar -cvf //archive//.zip //file// [//file//]...     |
  
  
Line 45: Line 46:
  
   - Navigate to the appropriate folder.   - Navigate to the appropriate folder.
-  - Click on the first file to select it. +  - Click on the first file or directory/folder to select it. 
-  - Command-click on any other files to select them.+  - Command-click on any other files or directories/folders to select them.
   - Right-click on one of the selected files and pull down to <key>Compress ... Items</key>.   - Right-click on one of the selected files and pull down to <key>Compress ... Items</key>.
 +
 To create a ''%%.zip%%'' file from the command shell, you can use the following command: To create a ''%%.zip%%'' file from the command shell, you can use the following command:
  
-  |   zip //archive//.zip //file// [//file//]...     |+|   zip //archive//.zip //file// [//file//]...     |
  
 If the Java Development Kit is installed and in your PATH, you   can also create a ''%%.zip%%'' file from the command shell using the following command: If the Java Development Kit is installed and in your PATH, you   can also create a ''%%.zip%%'' file from the command shell using the following command:
  
-  |    jar -cvf //archive//.zip //file// [//file//]...     |+|    jar -cvf //archive//.zip //file// [//file//]...     | 
 + 
 +Note that if you use the GUI-based approach, the resulting ''%%.zip%%'' file will contain OSX-specific files (like ''%%.DS_STORE%%'') and directories (like ''%%__MACOSX%%'') that can cause problems in some situations. You can exclude files when working from the command line using the ''%%-x%%'' option. For example: 
 + 
 +<code> 
 +zip -r dir.zip . -x .* -x __MACOSX 
 +</code> 
 + 
 +will create a ''%%dir.zip%%'' that contains all of the directories below the current directory, but will exclude all files that start with a ''%%.%%'' and the ''%%__MACOSX%%'' directory.