Hi !
I'm looking for your tips...
I created a bat file that create a folder.
the name of the folder "copied" from the local IP Address of the PC.
this is the bat file:
----------------
ipconfig /all > tempIP.txt
for /F "tokens=2 delims=:" %%j in ('ipconfig ^| find "IP Address"') do set Host=%%j
set Host=%Host:~1%
ren tempIP.txt "%Host%.txt"
------------------
my problem is that I search for a spesific key "IP Address" that compatible for windows XP \ 2003 only.
but if I want to run this bat file in windows 2008 OS, the key must be changed to "IPv4 Address".
I dont want to have 2 bat files ,each for diffrent OS.
how can I create one file that compatible for diffrent OS?
Thanks
Create folder named IP address for each PC
Moderator: DosItHelp
Re: Create folder named IP address for each PC
try findstr /r /c:"IP.* Address" instead find
Re: Create folder named IP address for each PC
thanks for the tip !!
works great
works great
Re: Create folder named IP address for each PC
How do you change a computers IP address? Ive recently converted to wireless internet and have had an error saying that someone with my IP address is already on the network,that if i do not fix it,i could have internet connectivity problems.I am unsure of how to change my IP address though. A friend of mine said its not possible to change your IP.
___________________________
affiliateelite ~ affiliateelite.com
___________________________
affiliateelite ~ affiliateelite.com
Last edited by cherilyn on 24 Jul 2011 01:04, edited 1 time in total.
Re: Create folder named IP address for each PC
'
Hi cherilyn, not really related to @ztahie's question. Next time create a new topic maybe.
Hi cherilyn, not really related to @ztahie's question. Next time create a new topic maybe.
example:How do you change a computers IP address?
Code: Select all
set "Netsh.Name____=LAN-verbinding"
set "Netsh.Source__=static"
set "Netsh.Address_=!IP.NET.Address!.30"
set "Netsh.Mask____=255.255.255.0"
set "Netsh.Gateway_=!IP.NET.Address!.1"
set "Netsh.Gwmetric=1"
::
echo. Netsh.Name : !Netsh.Name____!
echo. Netsh.Source : !Netsh.Source__!
echo.
echo. Netsh.Address : !Netsh.Address_!
echo. Netsh.Mask : !Netsh.Mask____!
echo. Netsh.Gateway : !Netsh.Gateway_!
echo. Netsh.Gwmetric: !Netsh.Gwmetric!
::
netsh interface ip set ^
address name="!Netsh.Name____!" ^
source=!Netsh.Source__! ^
addr=!Netsh.Address_! ^
mask=!Netsh.Mask____! ^
gateway=!Netsh.Gateway_! ^
gwmetric=!Netsh.Gwmetric!