Given the dir structure:
x\Code x\Script\Backup.ps1 Backup.ps1 contains:
$BackupDirectoy = "..\Backup" $CodeDirectory = "..\Code" function BackupCurrentVersion() { New-Item $BackupDirectoy -type directory -force Copy-Item $CodeDirectory -destination $BackupDirectory -recurse } BackupCurrentVersion I'm doing something wrong because Code gets copied in x\Script\Code instead of x\Backup\Code
What is the problem?