![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | DataBatcher 1.1 and PowerShell For anyone who might be interested... DataBatcher is a batch-processing .NET 2.0 application that I develop in my spare time. A DataBatcher job consists of a number of steps that are executed sequentially. Each step is based on a plugin module; a specific plugin module performs an individual task - e.g. converting image files. Plugin modules are written in C# or VB.NET - or any other .NET CLS-compliant language. But PowerShell allows scripting users to script their own steps using a new, generic "PowerShell" plugin module (written by me in C#). This module hosts a PS runspace, and injects a number of variables into the runspace that allows the step's script to interact with DataBatcher's runtime environment. DataBatcher is similar to PowerShell in that it too has an object pipeline - the sequential execution of the steps in a running job is the pipeline, but the object that is passed down the pipeline is always of the same type - a 'FileSet' object, which represents a set of files and folders to be operated on. The FileSet output of step N becomes the input of step N+1. Today I finished the "canonical" script for the PowerShell module in DataBatcher - i.e. it represents what a step in a job typically does. It needs tailoring by the scripter before it can be used in anger. I present this script here (see link below) as a means to shamelessly plug my app on this newsgroup but also to offer the script for those who might:-a) learn some techniques from it b) give me some pointers as to how I can improve it. Thank you. Andrew http://www.databatcher.com/DataBatch...l.Step.ps1.txt |
My System Specs![]() |
![]() |
| Thread Tools | |
| |