Search found 32 matches

by tbharber
06 Jan 2014 02:05
Forum: DOS Batch Forum
Topic: Unable to view log files on remote server in another domain
Replies: 16
Views: 13291

Re: Unable to view log files on remote server in another dom

The only workaround I have found so far is to use the "net use" command to map the folder to a drive letter... if exist l:\ (net use l: /d > nul) net use l: "\\scnice01\d$\Program Files\NICE Systems\Applications\ServerBin" passwordhere /user:proghsz\a083138 > nul findstr /L "...
by tbharber
05 Jan 2014 23:02
Forum: DOS Batch Forum
Topic: Unable to view log files on remote server in another domain
Replies: 16
Views: 13291

Re: Unable to view log files on remote server in another dom

That works just fine...

Code: Select all

%comspec% /c echo abc
abc
by tbharber
05 Jan 2014 22:54
Forum: DOS Batch Forum
Topic: Unable to view log files on remote server in another domain
Replies: 16
Views: 13291

Re: Unable to view log files on remote server in another dom

No luck either way with a text file with no spaces... runas /user:a083138@proghsz "type \\scnice01\c$\text.txt" Enter the password for a083138@proghsz: Attempting to start type \\scnice01\c$\text.txt as user "a083138@proghsz" ... RUNAS ERROR: Unable to run - type \\scnice01\c$\te...
by tbharber
05 Jan 2014 22:26
Forum: DOS Batch Forum
Topic: Unable to view log files on remote server in another domain
Replies: 16
Views: 13291

Unable to view log files on remote server in another domain

Hey All, I am working on a script to view log files on a remote server in another domain and am running into an issue. Below is what I get when I try to do this... runas /user:a083138@proghsz "type \\scnice01\d$\Program Files\NICE Systems\Applications\ServerBin\RuleEngine.txt | find ERROR"...
by tbharber
04 Jan 2014 23:16
Forum: DOS Batch Forum
Topic: Find all .txt & .log files modified today and display errors
Replies: 3
Views: 3679

Re: Find all .txt & .log files modified today and display er

This looks cool, the only problem is that the server I am doing this to I only have read access to. Can you think of a way to do it where we are not creating/deleting temp files?
by tbharber
04 Jan 2014 22:00
Forum: DOS Batch Forum
Topic: Find all .txt & .log files modified today and display errors
Replies: 3
Views: 3679

Find all .txt & .log files modified today and display errors

Hey All, I need to add a few lines to a script I am working on that will look at all .txt and .log files in a folder that were modified today and display all lines in the files that contain the text | ERROR | . For example it would look like the following.... File1.txt: 04/01/14 20:28:02.663 | ERROR...
by tbharber
27 May 2013 20:59
Forum: DOS Batch Forum
Topic: Changing the color of each line of output?
Replies: 2
Views: 3448

Changing the color of each line of output?

Hey all! I have a script that looks for a series of files. If they are found I want it to change the color of just that line to be green, and if it is not found, to be red. Below is a simplified version of the code I currently have. The problem is say file 1 is found and it is green, and if file 2 i...
by tbharber
27 May 2013 05:03
Forum: DOS Batch Forum
Topic: If Date not equal to today then run a command??
Replies: 4
Views: 5761

Re: If Date not equal to today then run a command??

Yep that was it. Thanks a ton!
by tbharber
27 May 2013 04:47
Forum: DOS Batch Forum
Topic: If Date not equal to today then run a command??
Replies: 4
Views: 5761

Re: If Date not equal to today then run a command??

That looks like it will work, but for whatever reason I cannot get it to say it is equal. The statement I gave above was a more simplified version of what I have. This is the code with your code included.... for %%i in ( scrfaxp5 scrfaxp6 srrfaxp5 srrfaxp6 ) do ( for /f "tokens=2" %%i in (...
by tbharber
27 May 2013 03:44
Forum: DOS Batch Forum
Topic: If Date not equal to today then run a command??
Replies: 4
Views: 5761

If Date not equal to today then run a command??

Hey all, I have a variable which has stored the modification date of a file in the format MM/DD/YYYY (ie. 05/27/2013) What I am trying to do is compare the date to today's, and if it is not the same then run a command. I am not sure how to do this because Windows stores the variable %date% as "...
by tbharber
27 May 2013 00:30
Forum: DOS Batch Forum
Topic: Need help updating file location path...
Replies: 2
Views: 3245

Re: Need help updating file location path...

That did it. Thanks!!!!!!
by tbharber
26 May 2013 20:11
Forum: DOS Batch Forum
Topic: Need help updating file location path...
Replies: 2
Views: 3245

Need help updating file location path...

I have the following script which checks for multiple running services on remote servers... set server1=scrfaxp5 set server2=scrfaxp6 set server3=scrfaxp8 set server4=srrfaxp5 set server5=srrfaxp6 set server6=srrfaxp8 echo "Verifying services..." echo. echo "%server1%" echo "...
by tbharber
04 Nov 2010 13:08
Forum: DOS Batch Forum
Topic: Log off Current Remote User
Replies: 1
Views: 3487

Re: Log off Current Remote User

BUMP!

Still looking for a way to log of the current user on a remote machine. I have searched the net over the last two weeks with no luck. Anyone have any ideas?
by tbharber
29 Oct 2010 13:11
Forum: DOS Batch Forum
Topic: Displaying computer name
Replies: 2
Views: 4416

Displaying computer name

I am trying to write a script to display a computers name if the IP Address is entered. I cant get the code to display it correctly. Currently this is what I have.... for /f "tokens=2 delims=g[" %%a in ('ping -a %ipaddress% ^|find "Pinging"') do echo Current Computer Name / IP: %...
by tbharber
06 Oct 2010 10:19
Forum: DOS Batch Forum
Topic: Delete all folders in a folder except two
Replies: 2
Views: 4182

Delete all folders in a folder except two

I am writing a script that will remove all of the user accounts on a computer. Currently the code is: rmdir /s /q "\\%computername%\c$\Documents and Settings\" This removes all folders (user windows profiles) under the documents and settings folder. The problem is this also removes the &qu...