Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Youtube Downloader Prompting Wrapper : wraps youtube-dl.exe for a start-menu icon that prompts for the url to download.
param( [Parameter(Mandatory=$true)][string]$UrlToDownload )
cd $downloadDirectory
write-host ""
write-host ""
write-host "Downloading $urlToDownload to $downloadDirectory ..."
write-host ""
write-host ""
youtube-dl.exe $urlToDownload
start youtube-dl -verb Runas -ArgumentList "-U"
Write-Warning "======================================================="
Write-Warning "The youtube downloader has to update first."
Write-Warning "Please try again after the update has run."
Write-Warning "======================================================="
} else {
write-host ""
write-host ""
ls | where {$_.LastWriteTime -gt [DateTime]::Today}
write-host ""
start-process $downloadDirectory

This comment has been minimized.

Copy link
Owner Author

chrisfcarroll commented Jul 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.