Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $assetList = (
- "D005971",
- "D005977",
- "D023665",
- "D005978",
- "D005979",
- "D005970",
- "D005982",
- "D005980",
- "D005983",
- "D005981",
- "M000826",
- "D005988",
- "D005992"
- )
- foreach ($houseNr in $assetList)
- {
- $sidecarFile = Join-Path -Path "\\my.server.name\cleanup" -ChildPath ($houseNr + ".xml")
- [xml]$sidecar = Get-Content -Path $sidecarFile
- foreach($segmentFile in $sidecar.sidecar.segmentFile) {
- $videoFileName = $segmentFile.fileName
- $destinationFile = Join-Path -Path "\\my.server.name\Ingest" -ChildPath $videoFileName
- $sourceFile = Join-Path -Path "\\my.server.name\cleanup" -ChildPath $videoFileName
- if (Test-Path $sourceFile) {
- Move-Item -Path $sourceFile -Destination $destinationFile -WhatIf
- } else {
- $sourceFile = Join-Path -Path "\\my.otherserver.name\cleanup" -ChildPath $videoFileName
- Copy-Item -Path $sourceFile -Destination $destinationFile -WhatIf
- }
- }
- $destinationFile = Join-Path -Path "\\\my.server.name\Ingest" -ChildPath ($houseNr + ".xml")
- if (!(Test-Path $destinationFile)) {
- Copy-Item -Path $sidecarFile -Destination $destinationFile
- }
- }
Add Comment
Please, Sign In to add comment