Functions/Backup-VstFolder.ps1


function Backup-VstFolder {
    
    [CmdletBinding()]
    param (
        # [Parameter(Mandatory)] [string] $ParameterName
    )

    $VstFolder = "C:\Program Files\Common Files\VST3"

    $BackupLocation = "$($env:OneDrive)\Guitar\VstBackup-$($env:COMPUTERNAME)"

    if (!(Test-Path $BackupLocation)) {

        New-Item $BackupLocation -ItemType Directory -Force

    }

    robocopy $VstFolder $BackupLocation /MIR /R:1 /W:1

}