WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: siocnarf on November 25, 2016, 11:36:48 AM

Title: Current script location
Post by: siocnarf 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,

Title: Re: Current script location
Post by: td 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.