mirror of
https://github.com/JG2401/DownloadsFileSync.git
synced 2026-08-29 04:30:15 +00:00
sourcePath and copy-item edited
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
$sourcePath = "Downloads"
|
$sourcePath = "C:\Users\YourUsername\Downloads"
|
||||||
|
|
||||||
$destinationPath = "\\YourServer\YourShare"
|
$destinationPath = "\\YourServer\YourShare"
|
||||||
$fileExtensions = @("exe", "msi", "iso", "img")
|
$fileExtensions = @("exe", "msi", "iso", "img")
|
||||||
$pattern = "[A-Za-z]+"
|
$pattern = "[A-Za-z]+"
|
||||||
@@ -35,7 +34,7 @@ while ($true) {
|
|||||||
$destFolder = $extensionFolder
|
$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
|
Start-Sleep -Seconds 600
|
||||||
|
|||||||
Reference in New Issue
Block a user