Mainpage | Getting Started | Advanced Info | HOW-TOs | FAQ
Introduction Batch file is a simple list of commands that can be used to create automated tasks. You can find the comprehensive list of the Batch file commands in here. There's also some example jvb scripts undr \jv16 PowerTools\Documentation\Example Scripts\ The commands used in a batch file are the same used in the Console. This means that the easiest way to create a batch file is to control jv16 PowerTools with the Console and write down all the command you need to write for the desired operation. You can create batch files with any text editor, such as Notepad. The file extension of a batch file is ".jvb". You can run these files by double clicking them, if you can't start jv16 PowerTools, go to preferences, more advanced and check "Register .jvb as jv16 PowerTools batch file". Simple Examples
RegTool CS StartUp SaveList RegTool "C:\startup.txt" Terminate
The batch saves the list of programs which start automatically to a file in a txt format.
Hide RegCleaner Manual -mos -idle -nopopup SaveList RegCleaner "C:\Entries.html" Run E:\D-Projektit\jv16 PowerTools\Temp\Entries.html -Shell Terminate
Runs one scan of the registry cleaner, saves the results to a html file and then opens the file in the default html viewer. The batch is ran without showing the PowerTools.
FileTool FindFiles [Source="C:\MP3\"] Find="*.mp3" Retrieve="Artist, Title, Comment"
Finds all MP3 files from C:\MP3\ (but not from its subdirectories) and retrieves some information about them. After searching the program waits for user to terminate it. Advanced Examples
If Tasks || LCase || sPos "sol.exe" {} > 0 then Kill sol.exe ||| ShowMessage You should be working, not playing Solitaire! -Boss Terminate
Checks if the user is playing Windows Solitaire, if he is the batch closes the game and reminds the user about more important things.
If GetTickCount || Calc {} / (1000*60*60) || Round > 0 then ShowMessage Your computer has been running over an hour!
Gets the computer's uptime, does some math and lets you know if your computer has been running over an hour.
Console Define x 0 Define z z := 6 For (i = x to z; +1) If i > 0 then if i <= 2 then PrintMessage i end end End
An example how to use loops and variables. This batch simply prints out the numbers one and two to the console screen.
Topics
Introduction
Simple Examples
Advanced Examples
.:: Copyright 2001-2003 Jouni Vuorio