Coding Thread, script to log dns cos some are wrong in Coding and Web Development; dont even know if this will work in the login script yet, rights etc, trying to get it working on ...
13th November 2008, 04:07 PM #1
script to log dns cos some are wrong
dont even know if this will work in the login script yet, rights etc, trying to get it working on my pc. Maybe I overloaded too may braincells on the script I wrote this morning but I'm having trouble understanding why this is doing what its doing
output is a file name 192.168.1.11 which contains "hello -ANDY5.txt"
for /f "tokens=5 delims= " %%a in ('netsh interface ip show dns ^| find "DNS"') do set DNSs=%%a && echo hello > \\server\share$\checkdns\%DNSs%-%computername%.txt
output ought to be a file named 192.168.1.11-andy5.txt which contains "hello"
oh i had a thought & found the answer....got rid of the set section and gone with "do echo hello > \\backup\logs$\checkdns\%%a-%computername%.txt"
and now it works for me. I still don't get why it didnt work before...anyone know?
IDG Tech News
By woody in forum Windows
Last Post: 15th February 2013, 03:28 PM
By dtakias in forum Windows
Last Post: 20th May 2010, 11:52 AM
By burgemaster in forum Windows
Last Post: 27th June 2008, 12:05 PM
By fooby in forum Wireless Networks
Last Post: 23rd November 2007, 05:07 PM
By FN-GM in forum Scripts
Last Post: 17th November 2007, 10:04 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)