Created
May 30, 2022 16:26
-
-
Save mono0x/a3ffd00e69ce8233eeccef347c861115 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
[Parameter(Mandatory, Position = 0)] | |
[String]$Source, | |
[Parameter(Mandatory, Position = 1)] | |
[String]$Destination, | |
[System.DateOnly]$Date = ([System.DateOnly]::FromDateTime([System.DateTime]::Now)), | |
[Parameter(Mandatory, Position = 2)] | |
[String]$Name | |
) | |
$ErrorActionPreference = 'Stop' | |
$result = Copy-Item -PassThru -Path $Source -Destination ( | |
New-Item -Type Directory -Force ( | |
Join-Path $Destination ("{0}\{0}-{1,2:00}\{0}-{1,2:00}-{2,2:00} {3}" -f $Date.Year, $Date.Month, $Date.Day, $Name) | |
) | |
) | |
. (Join-Path (Split-Path -Parent $PSCommandPath) Rename-Videos.ps1) $result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment