I require 2 scripts to be written
1. Script to create a zip file on the server
2. Upload to remote location and extract the contents of zip file. Must include good error handling.
Details below -
Thanks for your interest!
1. Create a zip file on the server - Take a source file or a source directory and save it as a zip file
- Specify the file or directory to zip (source)
- Specify where the zip file will be saved to (destination)
- Check to see if the destination folder already exists if not create it
- Check to see if the file already exists, If so either rename the existing file with current datetimestamp or overwrite the file
- Save file
2. Send zip file to remote location and unpack it:
- Upload a zip file to either a single, or multiple remote location
- extract contents to specified location (either root or specified directory)
If directory does not exist then create it
If the file already exists then choose whether to rename existing file or overwrite it
- configure permissions on files and/or directories
- return any errmsg that happened along the way else return "Extraction Complete"
- clean up delete zip file