[command scripting] echo naar file laat nieuwe regel achter

Pagina: 1
Acties:

  • talat
  • Registratie: Juni 2002
  • Laatst online: 03-02-2021
code:
1
2
3
4
5
@ECHO OFF
COPY "R:\...\SSSInstantMessenger.exe" "H:\mail\SSSInstantMessenger.exe"
COPY "R:\...\SSSIMFilePath.dat" "H:\mail\SSSIMFilePath.dat"
ECHO %username%> H:\mail\SSSIMUserName.dat
EXIT

In de 4e regel wordt de windows username variabele naar een plat tekstbestand geschreven. De regel waar de tekst op komt wordt ook afgesloten. Het bestandje komt er zo uit te zien:
code:
1
2
%username%
<nieuwe regel>

Ik zou graag deze output willen:
code:
1
%username%

Ik gebruik de windows XP/2k3 cmd.exe
Met google vind ik wel oplossing voor *nix bash scripts, maar niet voor windows.

How to? Mijn dank is groot.

TT