Advertisement
DrAungWinHtut

zip.c

Jun 19th, 2025
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.84 KB | None | 0 0
  1. #include <stdio.h>  //pound sign printf()
  2. #include <stdlib.h> // system()
  3.  
  4. int main()
  5. {
  6.     system("cls"); // This line is used to clear the console window
  7.     printf("Creating Zip file Hello.zip\n");
  8.     system("7za a hello.zip *.*"); // This line is used to pause the console window until a key is pressed
  9.     printf("Zip file created successfully.\n");
  10.     printf("Press any key to See File List...\n");
  11.     system("pause"); // This line is used to pause the console window until a key is pressed
  12.     system("dir");   // This line is used to display the list of files in the current directory
  13.     printf("Press any key to exit...\n");
  14.     system("pause"); // This line is used to pause the console window until a key is pressed
  15.     printf("Exiting...\n");
  16.     system("cls"); // This line is used to clear the console window
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement