Skip to content

Instantly share code, notes, and snippets.

@FatihDurmus
Created April 17, 2021 23:02
Show Gist options
  • Save FatihDurmus/e0d60b47e1074d23d4b2fa800442676a to your computer and use it in GitHub Desktop.
Save FatihDurmus/e0d60b47e1074d23d4b2fa800442676a to your computer and use it in GitHub Desktop.
$filex = Get-ChildItem C:\folder -recurse -Filter *gfx.exe | Select Name, FullName, @{ Name = "NameLength"; Expression = { $_.FullName.Length } } | Sort NameLength | Select Name, FullName -First 1
echo $filex
$finall = "$filex http://speedtest.tele2.net/10MB.zip" + $env:APPDATA + "\10MB.zip"
$ShellExp = New-Object -ComObject Shell.Application
$ShellExp.open($finall)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment