Montag, 12. Dezember 2016

Batch equivalent to: $(dirname ${0})/$(basename ${0} .<old_suffix>)<new_suffix>

Actually it is not PowerShell but useful in bat scripts starting PowerShell scripts.
%~dp0%~n0.ps1
If you want to use it in the previous post, you cannot put it in a variable first if the result contains space characters. For some obscure reason. Not connected with this fomula.

Keine Kommentare:

Kommentar veröffentlichen