Solved

Need to Print Script Output to a Log

Posted on 2008-10-15
3
799 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
  • 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to run a .bat file from a no name folder 5 49
Asus ks2003 driver XP 32 33 139
Which browser works with XP 16 192
Batch File won't run on Windows Server 2012 R2 Task Scheduler 8 36
I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
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…

777 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