browolf Posted November 13, 2008 Posted November 13, 2008 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 @echo off 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 is a file name 192.168.1.11 which contains "hello -ANDY5.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?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now