Doppelpunktgetrennte Textdatei einlesen Batch
Hallo,
ich habe eine Textdatei auf einem Server, die sieht so aus
und möchte aus einer bestimmten Zeile das hallo, moin etc. einlesen und in eine andere Textdatei speichern. Bisher sieht meine Batch so aus:
aber wie bekomme ich das hin, dass nur das "hallo, moin etc." verwendet wird?
Vielen Dank im Vorraus
Fabian Haas
ich habe eine Textdatei auf einem Server, die sieht so aus
z:hallo:z
z:moin:z
z:gruss-gott:z
z:wie-gehts:z
set /p NS=
set /a NSTEMP=NS-1
for /f "usebackq skip=%NSTEMP%" %%i in (\\%SERVERIP%\shares\%USERNAME%.txt) do (
echo %%i> "%USERPROFILE%\Datei.txt"
)
Vielen Dank im Vorraus
Fabian Haas
Please also mark the comments that contributed to the solution of the article
Content-Key: 229226
Url: https://administrator.de/contentid/229226
Printed on: April 24, 2024 at 19:04 o'clock
3 Comments
Latest comment
Hallo Fabian-Haas!
Etwa so:
Du solltest Dir das Tutorial zur FOR-Schleife von @Friemler ansehen ...
Grüße
bastla
Etwa so:
for /f "skip=%NSTEMP% tokens=2 delims=:" %%i in (\\%SERVERIP%\shares\%USERNAME%.txt) do (
Grüße
bastla