kikirikoukiko
New member
- Local time
- 3:04 AM
- Messages
- 1
I have the following batch script
The problem is that when i run it on my windows 7 desktop, it creates an empty txt file in comparison to my windows 8 laptop, where it creates the dns record that i need.
Does anyone knows why this happens on windows 7 ?
Code:
@echo off
setlocal enableextensions
set "baseName=dnshistory"
set "count=0"
for /f "delims=%baseName%." %%a in (
'dir /b /o-d "%baseName%*.txt" 2^>nul'
) do ( set /a "count=%%a+1" & goto saveData )
:saveData
ipconfig /displaydns | find "Record Name" > "%baseName%%count%.txt"
The problem is that when i run it on my windows 7 desktop, it creates an empty txt file in comparison to my windows 8 laptop, where it creates the dns record that i need.
Does anyone knows why this happens on windows 7 ?
My Computer
- Computer type
- Laptop
- Computer Manufacturer/Model Number
- Samsung
- OS
- Windows 8.1 pro x64