## Brondirectory
$projects = Get-Content -Path E:\__Scripts\project-sync.txt
foreach ($project in $projects)
{

## Server location
$Server=”\\192.168.10.51\SMM\PD\”
$ServLocal=”E:\__TEMP\”
$LogFolder=”E:\__TEMP\”

## Plaats van het logbestand
$logbestand1=”RAP_V11″
$extentie=”.txt”
$logbestand2=”LOG_V11″

## Koppelen van variabelen
$doel=$ServLocal+$project
$bron=$server+$project
$backupRapport=$LogFolder+$logbestand1+$project+$extentie
$logbestand=$logFolder+$logbestand2+$project+$extentie

## robocopy commando
## /NFL : No File List – don’t log file names.
## /NDL : No Directory List – don’t log directory names.
## /NJH : No Job Header.
## /NJS : No Job Summary.
## /NP : No Progress – don’t display percentage copied.
## /NS : No Size – don’t log file sizes.
## /NC : No Class – don’t log file classes.
## $bron = bron locatie van bestanden
## $doel = doel locatie voor bestanden
## /E =
## /w:1 = Wachten 1 seconden
## /r:1 = Retry 1x
## /COPY:DAT is zonder security
## /S = copy subfolders
## /E = copy subfolders inclusief lege folders

robocopy $bron $doel *.txt /s /W:1 /R:1 /COPY:DT /E /NFL /NDL /NJH /NJS /nc /ns /np
}