Solved

Need to Print Script Output to a Log

Posted on 2008-10-15
3
803 Views
Last Modified: 2012-05-05
I know this is somewhat basic but I cannot get this script to print to a log and it is driving me nuts.  It doesnt fail it just sits on the printing part for a very long time and then finally goes past without error only nothing shows up on my file.  What the script is doing is looking at pip files to spit out the last access date so we can find out if users are actually using their products.  I do not know if this is going to append or replace the file so i will need to address that as well but right now it does not print the script output at all.  I want it to print the entire dos window complete as I also have it spitting out the machine name so we will know what we are looking at in the log.  Any suggestions on why it will not print. I have admin rights on the test machine and it still does not want to write to the file.
cd\
cd documents*
 
net user
 
dir *.pip /S /T:A
 
PRINT c:\lag\project.log

Open in new window

0
Comment
Question by:TheITGuy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
TheITGuy earned 0 total points
ID: 22728650
I figured it out.  Sorry for the fals alarm..
0
 
LVL 6

Expert Comment

by:deiaccord
ID: 22729469
To clarify for people who find this you can redirect output usin the > symbol to a file (or >> to append)

So in this example something like the below was probaly user to create or overwrite the log file when run.

dir *.pip /S /T:A > c:\lag\project.log
0
 
LVL 1

Author Comment

by:TheITGuy
ID: 22729593
Here is what I ended up with.  Sorry.. I should have clarified.


c:
cd\
cd documents*
 
Set Logfile=\\dts19\smssour\msprojcomp\log\%computername%.log
 
net user>>%logfile%
 
dir *.pip /S /T:A>>%logfile%
 
exit

Open in new window

0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

687 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