We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
@Echo Off SETLOCAL EnableDelayedExpansion IF NOT EXIST C:\Computers.txt Goto ShowErr FOR %%R IN (C:\Computers.txt) Do IF %%~zR EQU 0 Goto ShowErr IF EXIST C:\SHAREinfo.csv DEL /F /Q C:\SHAREinfo.htm FOR /F %%c IN ('Type Computers.txt') Do ( Echo Processing: %%c PING -n 1 -w 1000 %%c|Find /I "TTL" >NUL IF NOT ErrorLevel 1 ( SET Qry=wmic /NODE:"%%c" share where type=0 get description,name,path /format:HTABLE !Qry! >>C:\SHAREinfo.htm )ELSE (Echo %%c: Not able to connect ) ) Goto EndScript :ShowErr Echo "C:\Computers.txt" file does not exist or file is empty! :EndScript ENDLOCAL :: Batch Script End
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Automatically update computer objects's Description field with last logged in user||10||67|
|AWK Why does this work and this not? Add a field to existing file, multiplied x another existing field.||26||38|
|Advice on a batch file that copies, moves, sftp's & deletes files||6||36|
|Powershell PGP and SFTP||1||10|