-
-
Save dterracino/e4dd19ac70f439c5bc07cc6bd53e09a6 to your computer and use it in GitHub Desktop.
Batch file that enables a CSV to be dragged/dropped and then opened in a PowerShell GridView. Requires the PowerShell ISE to be instaled.
This file contains hidden or 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
@echo off | |
IF "%~1"=="" GOTO NOFILE | |
set CSVPATH=%~1 | |
ECHO Loading CSV %CSVPATH% | |
powershell.exe -NoProfile -NoExit -NoLogo -Command "if ((Test-Path $env:CSVPATH -PathType Leaf) -and ($env:CSVPATH -like '*.csv')) {Import-Csv -Path $env:CSVPATH | Out-GridView -Wait -Title $env:CSVPATH};exit" | |
GOTO END | |
:NOFILE | |
ECHO No file specified | |
:END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment