Solved

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

Posted on 2008-06-26
6
153 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

770 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