String länge
Ermittelt die Länge eines beliebigen Strings
|
Script: |
@Echo Off
If %OS%'==Windows_NT' (Echo MS-DOS compatible bat file&Goto End)
If Not %1'==/?' If Not %1'==' Goto Begin
Echo Ermittelt die Länge eines Strings:
Echo.
For %%C In (Echo Goto:End) Do %%C STRLEN String
:Begin
Echo @Prompt Echo %1$H$H$G%TEMP%.\Tmp1.xat$_Exit$_>%TEMP%.\Tmp1.bat
%COMSPEC% /C %TEMP%.\Tmp1.bat | %COMSPEC% > NUL
For %%C In (1 2) Do Echo.
Dir %TEMP%.\Tmp1.xat | Find /I "Tmp1" > %TEMP%.\Tmp2.bat
Echo Set L=%%2>%TEMP%.\Tmp1.bat
Path > %TEMP%.\Tmp3.bat
Path %TEMP%;%PATH%
For %%C In (%TEMP%.\Tmp2 %TEMP%.\Tmp3 Del) Do Call %%C %TEMP%.\Tmp?.?at
Echo Demo: %L%
:End
|
|