Batch - Mijn contacten

Status
Niet open voor verdere reacties.
werkt prima.
ip kun je ook via batch achterhalen, echter als je meer ip-adressen hebt, wordt het iets lastiger.
Code:

IPCONFIG |FIND "IP" > %temp%\TEMPIP.txt
FOR /F "tokens=2 delims=:" %%a in (%temp%\TEMPIP.txt) do set IP=%%a
del %temp%\TEMPIP.txt
set IP=%IP:~1%
echo %IP% >%temp%\ip.txt
echo The current IP address is "%IP%"
pause
 
Verbeterde code:
arp.exe -a | find "Interface" > %temp%\TEMPIP.txt
for /f "tokens=2 delims= " %%a in (%temp%\TEMPIP.txt) do set IP=%%a
del %temp%\TEMPIP.txt
echo The current IP address is "%IP%"
pause
 
nu zou ik ook eens een ander batch file een menu die nieuw contact en contactenlijst opent.

files Mijn contacten - Nieuw contact.bat
Contactenlijst.bat
 
pagina wil niet laden :( maar heb al de oplossing :)
@echo off
color 04
title Mijn contacten - Menu
echo Mijn contacten - Menu
echo.
echo Make your choiche...
echo 1 Nieuw contact toevoegen
echo 2 Contactenlijst
echo 3 Exit
:choice

set /P C=[1, 2, 3]?

if "%C%"=="1" start Mijn contacten - Nieuw contact
if "%C%"=="2" start Contacten
if "%C%"=="3" exit
 
alleen nu nog een codetje als je het script afsluit

Mijn contacten - Menu.bat opent
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan