Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 67,291 of 68,980    |
|    Herbert Kleebauer to yelw0rc@gmx.net    |
|    Re: String (be)schneiden    |
|    14 Sep 18 23:25:26    |
      From: klee@unibwm.de              On 14.09.2018 15:37, yelw0rc@gmx.net wrote:       > Hallo,       >       > ich möchte gerne einen String um X Zeichen schneiden.       >       > Ich habe es mal so versucht.       >       > set /a New_StrLength=%StrLength%-25 // New_StrLength=47       > echo.%String:~0,%New_StrLength% <-- funktioniert so nicht       > echo.%String:~0,%New_StrLength%% <-- auch so nicht       >       > echo.%String:~0,47% <-- bringt zwar das gewünschte Ergebnis, soll aber       > variabel sein       >       > Wie macht man es richtig?              @echo off              set String=123456789012345678901234567890123456       set String=%String%%String%       set StrLength=72              set /a New_StrLength=%StrLength%-25       call echo.%%String:~0,%New_StrLength%%%              echo.%String:~0,47%              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca