8
0
Skriptentwickung/test/Dateien_Verschieben.ps1
2024-01-24 16:42:38 +01:00

10 lines
487 B
PowerShell
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Set-Variable -Name QuellPfad -Value "\\192.168.10.53\ftp\WebFrontEndVCL\WinSped_Export" -Scope Script
Set-Variable -Name ZielPfad -Value "\\dd-sto01\dd-sto01-a2\FTP\DD - Kunden\Vetra\WinSped_Export" -Scope Script
$Dateien = Get-ChildItem Path "$QuellPfad" -Include *.xml | where-object {$_.lastwritetime -lt (get-date).addminutes(-3)}
FOREACH ($Datei in $Dateien)
{
Write-Host "Verschiebe Datei $Datei"
$Datei | Move-Item -Destination $ZielPfad -Force
}