first completed scripts for backup + copy2external hd

This commit is contained in:
2021-11-06 14:10:21 +01:00
parent ec22def282
commit d14f7aa944
2 changed files with 7 additions and 7 deletions

View File

@@ -87,7 +87,7 @@ function startDocker(){
}
function copyDir($Source,$Destination){
$n = New-Item -ItemType Directory -Force -Path $Destination
Write-Host("Copy Folder: $Source to Folder: $Destination")
$files = Get-ChildItem $Source -Recurse
foreach ($f in $files){
@@ -96,9 +96,9 @@ function copyDir($Source,$Destination){
$n = New-Item -ItemType Directory -Force -Path $dest
} else {
if ($f.Length -gt 10000000){
#Start-BitsTransfer -Source $f.FullName -Destination $dest
Start-BitsTransfer -Source $f.FullName -Destination $dest
} else {
#Copy-Item -Path $f.FullName -Destination $dest
Copy-Item -Path $f.FullName -Destination $dest
}
}
}