Ricksmuseum

Batch files & VBScripts helping each other

Category: VBScript, Programming, Tech, General — Rick Companje — 27 June 2007 @ 21:16

To run command-line tools from a VBScript can be a little hassle because of the limited buffer size of the StdOut and StdErr. A nice solution which gives you VBScript functions and a command line window is shown in this example. The batch file calls the VBScript and waits. The VBScript generates a temporary batch file which is executed by the first one and deleted after execution.

I use this to run the pdf2swf tool multiple times to create a swf for every pdf page.

Batchfile:
@echo off
call makebatchfile.vbs boek-warnock.pdf 302
call converter-temp.bat
del converter-temp.bat

VBScript:
Batchfile - VBScript

1 Comment »

  1. Bedankt! Met jouw script heb je onze neus in de goede richting gezet. We moeten allemaal grote multipage pdf’s naar individuele swf’jes omzetten. Met dank aan pdf2swf en jouw batch-script gaat dat lukken. Onze programmeur maakt het nu in Actionscript aan…

    Comment by Igor — 6 November 2007 @ 16:01

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.