From 34b1ac0a5f10bf43ff0fc93a6e3fe77dcee3821f Mon Sep 17 00:00:00 2001 From: "jonas@geiger-natur.de" Date: Thu, 27 Jun 2024 21:13:13 +0200 Subject: [PATCH] sourcePath and copy-item edited --- DownloadsFileSync.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/DownloadsFileSync.ps1 b/DownloadsFileSync.ps1 index 51d8cee..0292df6 100644 --- a/DownloadsFileSync.ps1 +++ b/DownloadsFileSync.ps1 @@ -1,5 +1,4 @@ -$sourcePath = "Downloads" - +$sourcePath = "C:\Users\YourUsername\Downloads" $destinationPath = "\\YourServer\YourShare" $fileExtensions = @("exe", "msi", "iso", "img") $pattern = "[A-Za-z]+" @@ -35,7 +34,7 @@ while ($true) { $destFolder = $extensionFolder } - Copy-Item -Path $file.FullName -Destination "$($destFolder)\$($now.ToString("yyyy-mm-dd"))_$($file.Name)" -Force + Copy-Item -Path $file.FullName -Destination "$($destFolder)\$($now.ToString("yyyy-MM-dd"))_$($file.Name)" -Force } Start-Sleep -Seconds 600