Solved

How to redirect script results to a computer name on the network.

Posted on 2008-06-26
6
154 Views
Last Modified: 2010-04-21
Hello,

Situation:
I have a batch file I'm running on a lot of computers at times when no users are logged on to the machines.  The computers are on a Server2003 domain.  The batch file collects information from the machine that it's ran on and redirects or pipes the information to a Log file saved on the local C: drive.  I need the Log file to be more accessible so I don't have to go to each individual machine.

Here is my script:

*********below*************

REM Create a new log file
set logname=C:\log %date:/=-% %time::=-%.txt
echo Log of Results > "%logname%"
echo ------------------------- >> "%logname%"
echo.  >> "%logname%"

*********above*************

The problem I am working to resolve:
I can't figure out how to set the Logname to be redirected to my personal PC, that I work from, instead of being saved on the local HDD of every machine its ran on.

Thanks for comments and ideas,
zbox
0
Comment
Question by:zbox
  • 3
  • 2
6 Comments
 
LVL 15

Accepted Solution

by:
sr75 earned 500 total points
ID: 21874358
send it to a share on your laptop.  


echo -------------------------->>  \\YourMachine\YourShare
0
 
LVL 25

Expert Comment

by:slam69
ID: 21874372
what happens if your machien is not on teh network when the script runs? it will bomb teh script out, far better to redircet to a network share
0
 

Author Comment

by:zbox
ID: 21874378
that's too funny.  i use that command all the time and didn't think of that.  let me see what happens, be right back.

zbox
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 

Author Comment

by:zbox
ID: 21874912
man that worked! and as soon as you posted your comment I hit myself in the head.  well that was an easy 500 lol.  thanks a lot sr75 for quick response.  This stuff is real important to me.

Thanks EE,

zbox
0
 

Author Closing Comment

by:zbox
ID: 31470943
perfect and on time.
0
 
LVL 15

Expert Comment

by:sr75
ID: 21878562
No problem.   I have had many of those moments myself.  Thanks for the grade.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question