FFTools.psm1
#Load Tips File $tipspath = $PSScriptRoot + "\ffmpeg tips.txt" $tips = Get-Content $tipspath #Import Functions $FunctionPath = $PSScriptRoot + "\Functions\" $FunctionList = Get-ChildItem $FunctionPath -Name ForEach ($Function in $FunctionList) { . ($FunctionPath + $Function) } ##Function to Add ffmpeg module files to PSModulePath #Save the current value for PSModulePath in the $p variable. $p = [Environment]::GetEnvironmentVariable("Path") #Add the new path to the $p variable. Begin with a semi-colon separator. $exepath = $PSScriptRoot + "\ffmpeg_4.1.3\" $p += ";$exepath" #Add the paths in $p to the PSModulePath value. [Environment]::SetEnvironmentVariable("Path", $p) #Get commands function function Get-FFTools { Get-Command -Module FFTools } #Write intro to console Function Get-IntroFFTools { Write-Host " _______ _______ _______ __ | _ | _ | .-----.-----| .-----. |. 1___|. 1___|.| | | _ | _ | |__ --| |. __) |. __) '-|. |-|_____|_____|__|_____| |: | |: | |: | |::.| |::.| |::.| '---' '---' '---' " -Foregroundcolor Green Write-Host " --------------------------------------------------------------------" -Foregroundcolor Green Write-Host " > " -Foregroundcolor Green -NoNewline Write-Host "Use " -ForegroundColor Yellow -NoNewline Write-Host "Get-FFTools " -ForegroundColor Cyan -NoNewline Write-Host "to see a list of Commands " -ForegroundColor Yellow -NoNewline Write-Host "<" -Foregroundcolor Green Write-Host " > " -Foregroundcolor Green -NoNewline Write-Host "FFMpeg and FFProbe v4.1.3 added to the enviroment path " -ForegroundColor Yellow -NoNewline Write-Host "<" -Foregroundcolor Green Write-Host " --------------------------------------------------------------------" -Foregroundcolor Green Write-Host " " } #Present Information on Module Import Get-IntroFFTools #Go to staging folder $Staging = Read-Host "Specify your staging folder (no qoutes)" Set-Location $Staging |