Archive

Folder backup script for Windows

Michael Tkhorev
Michael Tkhorev Soft
@echo off

:: The chcp 65001 command sets the command line encoding to UTF-8, which allows Russian characters to be displayed and processed correctly.
:: > nul is used to suppress the output of the chcp command so as not to clutter the console.

chcp 65001 > nul

:: Copying folder. You may add another line for another folder:

robocopy "E:\Source\folder" "F:\Destination\folder" /E /Z /R:3 /W:5 /LOG:"F:\where_the_logs_are\Log.txt"

:: Using PowerShell for Backup. You may add another line for another folder:

powershell -Command "Compress-Archive -Path 'F:\Destination\folder\*' -DestinationPath 'F:\Destination\folder\archive.zip' -Force"

pause