einfachbernd
Goto Top

Temp soll in batch als temp in eine settings.ini ausgegeben werden?

hi,

habe in diesen batch file


:start
echo off
cls

set /p server=Servername:

echo migration = ^%temp^%\!!!Migration >> C:\settings.ini"

goto start


das problem dass %temp% in der settings.ini nicht angezeigt wird sondern

\!!!Migration

was mache ih da falsch?

möchte dass in der settings.ini das wie folgt drinnen steht:

%temp%\!!!migration

Bitte um Info face-smile

Content-Key: 173993

Url: https://administrator.de/contentid/173993

Printed on: April 16, 2024 at 09:04 o'clock

Member: bastla
bastla Sep 30, 2011 at 11:07:43 (UTC)
Goto Top
Hallo einfachBernd!

Info:
%%temp%%

Grüße
bastla

P.S.: Bitte um "Code"- ...
Member: einfachBernd
einfachBernd Sep 30, 2011 at 11:17:39 (UTC)
Goto Top
;)

also i find des genial

in da cmd brauchst ^%temp^%
in an batch brauchst %%temp%% *lach*

danke
Member: pieh-ejdsch
pieh-ejdsch Sep 30, 2011 at 13:35:00 (UTC)
Goto Top
moin Bernd,

in da cmd brauchst ^%temp^%
Nicht ganz ... das erste Zirkumflex wird nicht benötigt.

das funktioniert aber nur wenn die Umgebungsvariable
temp^
nicht Besteht

>echo %temp^%
%temp%

>set temp^^=2

>echo %temp^%
2

Gruß Phil