Author Topic: Current script location  (Read 1828 times)

siocnarf

  • Newbie
  • *
  • Posts: 36
Current script location
« on: November 25, 2016, 11:36:48 am »
Hi,

Is it a way to get there the location of the running Winbatch script?
With Powershell, it would be-->  $scriptDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
But with Winbatch?

Thanks,


td

  • Tech Support
  • *****
  • Posts: 4059
    • WinBatch
Re: Current script location
« Reply #1 on: November 25, 2016, 02:05:53 pm »
Use the DirScript function.  Please see the DirScript function's topic in the Consolidated WIL help file for details.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade