0

I have written some Linqpad scripts and would like to run each of them from one batch file, in other words one after another.

My question is how can I do that? I have been searching for a while now on Stack overflow but have come up short each time, this question LINQPad - can you run a linqpad script from the command-line? is the closest but the best answer only links back to the Linqpad instructions for command line scripting here.

Am i missing something or is this not possible? I dont understand what lprun.exe mentioned in the documentation should do because when i run it there is no command line interface it just opens the interface and closes again.

For Reference

I have the following simple batch script written which does not do what is needed

A) Because Im not sure how to write the path properly (new to command line scripting)

B) Im not sure how to execute the MyScript script once the LINQPad.exe has ran.

ECHO OFF

ECHO.
TITLE File opener

START "C:/Program Files (x86)/LINQPad4/MyScript.linq"

EXIT

Paths:

LINQ Scripts- C:\Documents\LINQPad Queries\MyScript.linq

LINQPad location - C:\Program Files (x86)\LINQPad4


Thanks for the help.


UPDATE

I made some progress using the following script

ECHO OFF

ECHO.
TITLE File opener

LPRun.exe "C:/Program Files (x86)/LINQPad4/MyScript.linq" 

PAUSE
EXIT

I receive the following error

enter image description here

Community
  • 1
  • 1
Master Yoda
  • 4,334
  • 10
  • 43
  • 77

1 Answers1

1

Try lprun.exe "C:\Program Files (x86)\LINQPad4\MyScript.linq" It worked for me :)