Archive files and folders using 7zip
Go to file
Frank Bischof 6ad8b20d23 v3.0.1
2023-06-08 09:29:16 +02:00
7zip_archiver_v2.ps1 v3.0.1 2023-06-08 09:28:26 +02:00
CHANGELOG v3.0.1 2023-06-08 09:28:26 +02:00 v3.0.1 2023-06-08 09:29:16 +02:00

Archive using 7zip

This script is used for archiving major data.


The script needs to know where to find the CSV file which needs to be loaded. This CSV path can be set in the global vars part of the script.

  • 7zip needs to be installed
  • robocopy needs to be installed


$MAX_FOLDER_SIZE = Max folder size to zip, otherwise switch to robocopy.
$TIMESTAMP = Timeformat to use for the logfile
$TARGET_FILENAME = Target archive name
$CSVFILE = Source CSV file
$LOGFILE = Log file
$TEMPFOLDER_RUNNING = Source folder name for when archive is running
$TEMPFOLDER_DONE = Source folder name for when archive is done
$TEMPFOLDER_FAILED = Source folder name for when archive is failed

CSV template

Create a CSV file containing the following setup:

Source path, Target path

You can add multiple lines where the script loops through.



Run script


Just sit back and relax...