Page 1 of 1

How to replace the script name %~n0 with a string of "-" characters of length %~n0?

Posted: 10 Jan 2024 02:07
by PiotrMP006
Hi

How to replace the script name %~n0 with a string of "-" characters of length %~n0?

Code: Select all

ex. %~n0 = Test.bat

How do I change "Test.bat" to the string "---------" ?

Test.bat
--------

Re: How to replace the script name %~n0 with a string of "-" characters of length %~n0?

Posted: 10 Jan 2024 03:39
by T3RRY
PiotrMP006 wrote:
10 Jan 2024 02:07
Hi

How to replace the script name %~n0 with a string of "-" characters of length %~n0?

Code: Select all

ex. %~n0 = Test.bat

How do I change "Test.bat" to the string "---------" ?

Test.bat
--------

Isn't this essentially the same question you asked at viewtopic.php?f=3&t=10962&sid=a5ee30475 ... 272ec4dfac