Search code examples
powershellfile-ioopenfiledialog

doubleclick on filename OPEN DEFAULT EDITOR in PowerShell ISE editor


$fromDir = "C:\temp\STA\"
$controlFileArray = Get-ChildItem $fromDir\*.SSISDeploymentManifest | % { ($_.basename)}
echo $controlFilearray 

From above script, I am taking file name in one variable, how to double click this filename using power shell so that it will open in desired editor.


Solution

  • If file is c:\temp\t.txt try :

    $a = "c:\temp\t.txt"
    & $a