scripting

how to graph / chart multiple ping results using shell scripting and logparser

i probably should have called this post 'stupid batch file tricks' or 'how much time do you want to waste on batch files' as well. =P anyway, i needed to graph something else, and i was fiddling around with logparser. if you have ever fiddled, you have probably googled, and if you have ever googled for logparser, you probably have come across Ken Schaefer's blog post about graphing ping results. it's at http://www.adopenstatic.com/cs/blogs/ken/archive/2005/05/30/22.aspx if you haven't. go check it out. i will wait. it's quite short. wayyyy shorter than this. =P anyway, i wanted to represent several test result series from...

posted @ Wednesday, May 26, 2010 1:00 AM | Feedback (0)

Adding a task item to sharepoint with VBScript and Microsoft.XMLHttp

who'd want to such a crazy thing? well me. i just wanted to find the dirtiest quickest way with zero overhead to push data directly into a sharepoint list. i found a few articles with some information about this, but the closest one was this one using jquery. so here it is in vbscript with no extra libraries or anything (except what is build into windows which is still plenty). one cool thing about this is it was quite faster than the .net method i posted previously. i attribute that to building a nice web reference with all the different...

posted @ Thursday, October 15, 2009 10:46 PM | Feedback (12)

create a custom sendto item to process files... with powershell...

in reply to dennis' comment on my last post on this little thing (http://drowningintechnicaldebt.com/blogs/royashbrook/archive/2009/01/21/create-a-custom-sendto-item-to-process-files.aspx), here's the way to do this with powershell make sure you have powershell installed and working create script somewhere with text: foreach ($i in $args) {move-item $i $i.Replace(".mod", ".mpeg")} create a shortcut in the sendto folder that has the command of '[pathtopowershell.exe] -noexit [pathtoscript] enjoy! i was only renaming certain files to certain other files (MOD to MPEG), but obviously you can customize this however you see fit. i had my batch before set not to exit so i could see what was up, but you could take...

posted @ Monday, May 18, 2009 7:27 PM | Feedback (3)

create a custom sendto item to process files

so i have this video camera and it records files to mod files. i dunno why. mod's are just like mpegs. you can just rename them and open them. i don't know why they aren't just saved as mpegs, but whatever. so i got tired of dropping out to dos and just renaming the files so i could review them. i could also i'm sure find a way to just register mod files with my computer but bah. i decided to just create a custom sendto item so i could just mass rename them. so if you want to rename...

posted @ Thursday, January 22, 2009 3:41 AM | Feedback (2)

Stupid Windows Shell Scripting Tricks

If you've never used the 'for' command in windows, it is your friend. It longs for you to use it! It is 'Da Bizzle' as the kids say. Here's a silly little example of using it to delete all of the temporary internet files from all of the profiles on a machine.cd C:\Documents and Settingsfor /f "tokens=*" %i in ('dir /b') do rd /s ".\%i\Local Settings\Temporary Internet Files\"

posted @ Monday, February 18, 2008 7:23 AM | Feedback (0)

view svn change log, quick and dirty

if you have a "burning" need, as some do, to view the change log for a bunch of files in svn, here's a quick way in windows to do it. just save the following as showsvnlog.cmd or whatever cmd or bat you want in your sendto folder and highlight whatever files you want and send them to it. you can also just drag and drop files onto it. this script utilizes some basic looping, shift, and alternate data streams. nothing revolutionary, but it does the job. here's the code:::showsvnlog.cmd::royashbrook - execute svn log for files and show the output@echo offset...

posted @ Friday, March 30, 2007 5:22 AM | Feedback (0)

ping check - aka isup

@echo offset a=1ping -n 1 %1 | find /c "bytes=32" > nulif %errorlevel% == 1 set a=0echo %1 %a%set a=(via don't feed the penguins)*edit*this is a very simple shell script that i used to use for ping checks. i found that it even outperformed using the wmi ping and several other mechanisms for pinging machines that i tried. i'm sure i could rant on at length about all of the times and ways that i had used it, but i won't. note that you could just look for 1 as an error and just use error level, i wanted to...

posted @ Friday, March 09, 2007 2:05 PM | Feedback (0)