﻿using System.IO;
using System.IO.Compression;

namespace Ensconce.Console
{
    internal static class Backup
    {
        internal static void DoBackup()
        {
            if (File.Exists(Arguments.BackupDestination) && Arguments.BackupOverwrite)
            {
                File.Delete(Arguments.BackupDestination);
            }

            ZipFile.CreateFromDirectory(Arguments.BackupSource, Arguments.BackupDestination, CompressionLevel.Optimal, false);
        }
    }
}

﻿using System.IO;
using System.IO.Compression;

namespace Ensconce.Console
{
    internal static class Backup
    {
        internal static void DoBackup()
        {
            var backupSource = Arguments.BackupSource.Render();
            var backupDestination = Arguments.BackupDestination.Render();

            if (File.Exists(backupDestination) && Arguments.BackupOverwrite)
            {
                File.Delete(backupDestination);
            }

            ZipFile.CreateFromDirectory(backupSource, backupDestination, CompressionLevel.Optimal, false);
        }
    }
}

Add tag replacement on backup paths
Add tag replacement on backup paths
