BATCH= Running Winsteps in batch mode = No

If you want Winsteps to close itself after performing an analysis and writing out any output specified in the control file, e.g., by TABLES=, then specify BATCH=YES in the control file. You can launch batch files from the Batch menu.

 

If you want Winsteps to run in "background" with the minimum user interaction, then specify BATCH=YES in the Shortcut, DOS or Shell command which invokes Winsteps.

 

If you want to run Winsteps "hidden" then call it from the MS-DOS prompt:

Winsteps.exe batch=yes inputfile.txt outputfile.txt

 

If you want to run Winsteps so that it is visible, but automatically closes then:

Winsteps.exe inputfile.txt outputfile.txt

and include the command "batch=yes" in the inputfile.txt

 

If you want to run many Winsteps analyses consecutively, then use BATCH=Yes. Here is an example using Winsteps to simulate multiple datasets and analyze them.

 

Running Winsteps in Batch mode: If this won't work for you, see Difficulty below.

 

In most versions of Windows, .bat and .cmd function in the same way.

 

Please use whatever works in your version of Windows. First, test what works on your computer:

 

Create a simple text file on your Desktop with Notepad

contents are:

 

START /WAIT NOTEPAD

START /WAIT NOTEPAD

 

Name it "test.bat"

 

Double-click on it. Does Notepad launch? Close Notepad. Does another Notepad launch. If so, all is OK. Use a .bat batch file with START

 

If not, rename "test.bat" to "test.cmd".

Double-click on it. Does Notepad launch? Close Notepad. Does another Notepad launch. If so, all is OK. Use a .cmd batch file with START

 

If not,

rename "test.cmd" to "test.bat"

change the contents of "test.bat" to

 

NOTEPAD

NOTEPAD

 

Double-click on it. Does Notepad launch? Close Notepad. Does another Notepad launch. If so, all is OK. Use a .bat batch file without START.

 

If none of these work for you, then your version of Windows may not support batch files. Please contact www.winsteps.com.

 

Example: Blanks act like new lines in a control file. Commas act like blanks:

START /WAIT ..\Winsteps BATCH=YES SF.txt SF.OUT TFILE=* 1 *  PERSON=CASE IDELETE=3,4,24

 

Under Windows-2000, -XP and later Windows-NT

 

It is often useful to run multiple Winsteps tasks, one after the other, without keyboard intervention. This can be accomplished by running Winsteps in CMD batch mode.

 

i) On the main Winsteps screen, click on the "Batch" menu item.

ii) On the pull-down menu, select "Edit batch file".

iii) In the dialog box, select Winbatchcmd.cmd and click on "Open"

iv) The following batch file is available to edit:

 

echo  This is the version for Windows-NT, 2000

echo  This is a batch file to run Winsteps in batch mode

echo  Edit the next lines and add more.

echo  Format of lines is:

echo  START /WAIT c:\Winsteps\Winsteps BATCH=YES c:\folder\Control-file c:\folder\Output-file Extra=specifications

START /WAIT ..\Winsteps BATCH=YES EXAMPLE0.txt EXAMPLE0.OUT TABLES=111

START /WAIT ..\Winsteps BATCH=YES SF.txt SF.OUT TFILE=* 1 *  PERSON=CASE

START /WAIT ..\Winsteps BATCH=YES KCT.txt KCT.OUT TFILE=* 3 20 * MRANGE=4

 

These characters have special meanings in batch files: @ & ^ ( )

 

v) The lines starting with "echo" are comments.

v) Lines starting "START /WAIT c:\Winsteps\Winsteps BATCH=YES" execute Winsteps from the Winsteps folder

vi) The format is START /WAIT Winsteps BATCH=YES control-file output-file extra-specifications

vii) Each new Winsteps line is an additional run of the Winsteps program

viii) Edit and save this file. You can save it with any name ending ".cmd"

 

ix) From the "Batch" pull-down menu, select "Run batch file".

x) Right-click on the desired batch file

xi) In the right-click menu, left-click on "open"

x) The batch file will run - if nothing happens, the batch file is incorrect.

xi) Exit from the Winsteps dialog by clicking on "Cancel".

xii) You can minimize the batch screen by clicking on the underline in the top right corner.

xiii) You can cancel the batch run by right clicking on the Batch icon in the Task bar, usually at the bottom of the screen.

 

Under early versions of Windows (e.g. 98, ME) except early Windows-NT nor -9 nor 3.1

 

It is often useful to run multiple Winsteps tasks, one after the other, without keyboard intervention. This can be accomplished by running Winsteps in batch mode.

 

i) On the main Winsteps screen, click on the "Batch" menu item.

ii) On the pull-down menu, select "Edit batch file".

iii) In the dialog box, select Winbatchbat.bat and click on "Open"

iv) The following batch file is available to edit:

 

echo  This is the version for WINDOWS-98 and ME

echo  This is a batch file to run Winsteps in batch mode

echo  Edit the next lines and add more.

echo  Format of lines is:

echo  START /w c:\Winsteps\Winsteps BATCH=YES c:\folder\Control-file c:\folder\Output-file Extra=specifications

START /w ..\Winsteps BATCH=YES EXAMPLE0.txt EXAMPLE0.OUT.txt TABLES=111

START /w ..\Winsteps BATCH=YES SF.txt SF.OUT.txt TFILE=* 1 * PERSON=CASE

START /w ..\Winsteps BATCH=YES KCT.txt KCT.OUT.txt TFILE=* 3 20 * MRANGE=4

 

These characters have special meanings in batch files: @ & ^ ( )

 

v) The lines starting with "echo" are comments.

v) Lines starting "START /w Winsteps BATCH=YES" execute Winsteps

vi) The format is START /w Winsteps BATCH=YES control-file output-file extra-specifications

vii) Each new Winsteps line is an additional run of the Winsteps program

viii) Edit and save this file. You can save it with any name ending ".bat"

 

ix) From the "Batch" pull-down menu, select "Run batch file".

x) Right-click on the desired batch file

xi) In the right-click menu, left-click on "open"

x) The batch file will run - if nothing happens, the batch file is incorrect.

xi) Exit from the Winsteps dialog by clicking on "Cancel".

xii) You can minimize the batch screen by clicking on the underline in the top right corner.

xiii) You can cancel the batch run by right clicking on the Batch icon in the Task bar, usually at the bottom of the screen.

 

Under early Windows-NT

 

It is often useful to run multiple Winsteps tasks, one after the other, without keyboard intervention. This can be accomplished by running Winsteps in batch mode.

 

i) On the main Winsteps screen, click on the "Batch" menu item.

ii) On the pull-down menu, select "Edit batch file".

iii) In the dialog box, select NTbatch.bat and click on "Open"

iv) The following batch file is available to edit:

 

echo  This is for early versions of WINDOWS-NT

echo  For later versions use *.cmd files

echo  This is a batch file to run Winsteps in batch mode

echo  Edit the next lines and add more.

echo  Format of lines is:

echo  c:\Winsteps\Winsteps BATCH=YES c:\folder\Control-file c:\folder\Output-file Extra=specifications

..\Winsteps BATCH=YES EXAMPLE0.txt EXAMPLE0.OUT.txt Tables=111

..\Winsteps BATCH=YES SF.txt SF.OUT.txt TFILE=* 1 * PERSON=CASE

..\Winsteps BATCH=YES KCT.txt KCT.OUT.txt TFILE=* 3 20 * MRANGE=4

 

These characters have special meanings in batch files: @ & ^ ( )

 

v) The lines starting with "echo" are comments.

v) Lines starting "Winsteps BATCH=YES" execute Winsteps

vi) The format is Winsteps BATCH=YES control-file output-file extra-specifications

vii) Each new Winsteps line is an additional run of the Winsteps program

viii) Edit and save this file. You can save it with any name ending ".bat"

 

ix) From the "Batch" pull-down menu, select "Run batch file".

x) Right-click on the desired batch file

xi) In the right-click menu, left-click on "open"

x) The batch file will run - if nothing happens, the batch file is incorrect.

xi) Exit from the Winsteps dialog by clicking on "Cancel".

xii) You can minimize the batch screen by clicking on the underline in the top right corner.

xiii) You can cancel the batch run by right clicking on the Batch icon in the Task bar, usually at the bottom of the screen.

 

Example: I want to automatically run multiple DIF reports for the same set of data.

Since Winsteps can only perform one DIF analysis at a time in batch mode, you can use anchor files:

First line in batch file, produce measure files

Winsteps BATCH=YES infile outfile dif=$s1w1 ifile=ifile.txt pfile=pfile.txt sfile=sfile.txt

Later lines in batch file, use measure files as anchor files

Winsteps BATCH=YES infile outfile2 dif=$s2w1 ifile=iafile.txt pfile=pafile.txt safile=sfile.txt tfile=* 30 *

Winsteps BATCH=YES infile outfile3 dif=$s3w1 ifile=iafile.txt pfile=pafile.txt safile=sfile.txt tfile=* 30 *

 


A Winsteps batch processor for Windows

 

Batch files under Windows XP are used to test out new features in Winsteps. Here is what is done:

 

a) Create a new subfolder of c:\Winsteps, called c:\Winsteps\test

 

b) Copy into folder "test" all the control and data files to be analyzed. For instance all the Winsteps example control and data files, which are found in c:\Winsteps\examples

 

c) Use Notepad to create a file in c:\Winsteps\test to do the analysis. This file is "saved as" test.bat

This file contains, for instance:

 

start /w c:\Winsteps\Winsteps batch=yes exam1.txt exam1.out DISC=YES TABLES=111

start /w c:\Winsteps\Winsteps batch=yes exam9.txt exam9.out DISC=YES TABLES=111

start /w c:\Winsteps\Winsteps batch=yes sf.txt sf.out DISC=YES TABLES=111

 

You can replace ..\Winsteps with the pathname to your copy of Winsteps.exe

d) double-click on test.bat in c:\Winsteps\test to run this batch file.

e) Winsteps "flashes" on the task bar several times, and progress through the batch file is shown in a DOS-style window.

e) the .out files are written into c:\Winsteps\test

 

Example 1. Windows XP file: test.cmd to do 10 analyses from the same control and data files

 

rem - change the directory to the control and data files

chdir c:\Winsteps\examples

chdir

echo check that the change directory worked

pause

START /Wait c:\Winsteps\Winsteps.exe exam1.txt SCReadDIFg2.out.txt pselect=$2* Title=READING_DIF_grade_2

echo check that Winsteps was called as expected: add BATCH=Y to the line above when it works correctly

pause

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam1.txt exam1g3.out.txt pselect=$3* Title=READING_DIF_grade_3

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam1.txt exam1g4.out.txt pselect=$4* Title=READING_DIF_grade_4

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam1.txt exam1g5.out.txt pselect=$5* Title=READING_DIF_grade_5

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam1.txt exam1g6.out.txt pselect=$6* Title=READING_DIF_grade_6

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam1.txt exam1g7.out.txt pselect=$7* Title=READING_DIF_grade_7

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam1.txt exam1g8.out.txt pselect=$8* Title=READING_DIF_grade_8

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam1.txt exam1g10.out.txt pselect=$10* Title=READING_DIF_grade_10

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam2.txt exam2g2.out.txt pselect=$2* Title=MATH_DIF_grade_2

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam2.txt exam2g3.out.txt pselect=$3* Title=MATH_DIF_grade_3

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam2.txt exam2g4.out.txt pselect=$4* Title=MATH_DIF_grade_4

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam2.txt exam2g5.out.txt pselect=$5* Title=MATH_DIF_grade_5

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam2.txt exam2g6.out.txt pselect=$6* Title=MATH_DIF_grade_6

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam2.txt exam2g7.out.txt pselect=$7* Title=MATH_DIF_grade_7

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam2.txt exam2g8.out.txt pselect=$8* Title=MATH_DIF_grade_8

START /Wait c:\Winsteps\Winsteps.exe BATCH=Y exam2.txt exam2g10.out.txt pselect=$10* Title=MATH_DIF_grade_10

 

Example 2. To estimate the expected values of the eigenvalues in Table 23.0 by simulation

Your files are in folder: D:\rasch_simulation
Winsteps.exe is in folder C:\Winsteps
The output is Table 23.0
The batch file is:
 
D:
MKDIR \rasch_simulation
CD \rasch_simulation
REM
START /WAIT C:\Winsteps\winsteps.exe BATCH=YES marlon0.txt marlon0.out.txt PFILE=pf.txt IFILE=if.txt SFILE=sf.txt
REM
set /a test=1
:loop
REM
START /WAIT C:\Winsteps\winsteps.exe BATCH=YES marlon0.txt marlon0%loop%.out.txt PAFILE=pf.txt IAFILE=if.txt SAFILE=sf.txt SIFILE=SIFILE%test%.txt SISEED=0
REM
START /WAIT C:\Winsteps\winsteps.exe BATCH=YES marlon0.txt data=SIFILE%test%.txt SIFILE%test%.out.txt TFILE=* 23.0 *
REM
set /a test=%test%+1
if not "%test%"=="11" goto loop
PAUSE

 


 

Difficulty running Batch or Command files?

Microsoft Windows is designed to run interactively, not in batch mode. Microsoft are not consistent with the way they implement batch files in different versions of Windows. So our challenge is to discover a method of running batch files that works for the version of Windows we happen to have. Since Windows is very bad at running batch or command files. You need to validate your instructions one step at a time:

 

First make sure that your batch file runs without "BATCH=YES" so that you can see Winsteps in operation.

 

Paths with blanks? Put in quotes:

START /WAIT "e:\my folder\Winsteps folder\Winsteps.exe" BATCH=YES ....

 

i) Run Winsteps in standard mode from the DOS command prompt.

 

ii) Have the full paths to everything in your batch or command file, e.g., called mybatch.cmd,

START /WAIT c:\Winsteps\Winsteps BATCH=YES c:\Winsteps\examples\example0.txt c:\Winsteps\examples\example0.out.txt
also have full paths to everything in your Winsteps control file, e.g.,

DATA = c:\Winsteps\examples\mydata.txt

 

Note: In this Batch command:

START /WAIT c:\Winsteps\Winsteps BATCH=YES c:\Winsteps\examples\controlfile.txt outputfile.txt
file "outputfile.txt" will be placed in directory "c:\Winsteps\examples\"

 

iii) Windows "Start" menu. "Run". Copy and paste the following line into the Windows Run box on the Windows Start menu. Click OK:

c:\Winsteps\Winsteps c:\Winsteps\examples\example0.txt c:\Winsteps\examples\example0.out.txt table=1

 

Does Winsteps start in the ordinary way? This tests the Windows command line interface.

 

iv) Windows "Start" menu. "Run". Copy and paste the following line into the Run box. Click OK:

c:\Winsteps\Winsteps BATCH=YES c:\Winsteps\examples\exam15.txt c:\Winsteps\examples\exam15.out.txt table=1

 

Does the Winsteps icon appear on the Task bar and then disappear? This tests Winsteps background processing.

 

v) On your desktop, right-click, "New", "Text document". Double-click on icon. Paste in:

START /WAIT c:\Winsteps\Winsteps c:\Winsteps\examples\example0.txt c:\Winsteps\examples\example0.out.txt table=1

 

"Save as" Test.cmd. Double-click on Test.cmd

 

Does Winsteps run in the ordinary way? This test the Windows START function. If this fails, "Save as" Test.bat instead of Test.cmd.

 

vi) On your desktop, right-click, "New", "Text document". Double-click on icon. Paste in:

START /WAIT c:\Winsteps\Winsteps BATCH=YES c:\Winsteps\examples\exam15.txt c:\Winsteps\examples\exam15.out.txt table=1

 

"Save as" Test2.cmd. Double-click on Test2.cmd (or "Save as" Test2.bat if that works better on your computer.)

 

Does the Winsteps icon flash on the task bar line, and then disappear? Winsteps has run in background.

 

vii) Now build your own .cmd batch file, using lines like:

START /WAIT c:\Winsteps\Winsteps BATCH=YES c:\Winsteps\examples\example0.txt c:\Winsteps\examples\example0.out.txt

 

viii) If your command line contains sub-lists, indicate those with commas, e.g.,

IWEIGHT=* 23,2.5 47,1.3 *

 


 

Running Winsteps within other Software

Automating the standard version of Winsteps is straightforward using the control instruction BATCH=YES. Winsteps will run under Windows in background.

 

Let's assume your software is written in Visual Basic (or any other programming, database or statistical language)

 

(a) write out a Winsteps control file as a .txt file

(b) write out a Winsteps data file as a .txt file

(c) "shell" out to

"START /WAIT Winsteps BATCH=YES controlfile.txt outputfile.txt data=datafile.txt ifile=ifile.txt pfile=pfile.txt"

 

(d) read in the ifile.txt, pfile.txt or whatever Winsteps output you need to process.

 

This is being done routinely by users of SAS.

 


 

Running Winsteps within R

 

Use the R "system" command. To test that Winsteps runs correctly, specify:

 

try(system("c:/Winsteps/Winsteps.exe BATCH=NO yourcontrolfile youroutputfile", intern = TRUE, ignore.stderr = TRUE))

 

or, if the file names contain spaces, then use single quotes and double quotes:

 

try(system('c:/Winsteps/Winsteps.exe BATCH=NO "your control file" "your output file" ', intern = TRUE, ignore.stderr = TRUE))

 

For regular use:

 

try(system("START /WAIT c:/Winsteps/Winsteps.exe BATCH=YES yourcontrolfile youroutputfile", intern = TRUE, ignore.stderr = TRUE))

 

or

 

try(system('START /WAIT c:/Winsteps/Winsteps.exe BATCH=YES  "your control file" "your output file" ', intern = TRUE, ignore.stderr = TRUE))

 

 

 


Help for Winsteps Rasch Measurement Software: www.winsteps.com. Author: John Michael Linacre

Just released in June 2017: Winsteps 4.0 with Table 45 Cumulative Plot

New and on-going: Masterchef Australia 2017: Rasch Measurement of Cooks with Table 45

For more information, contact info@winsteps.com or use the comment form below.
 

Facets Rasch measurement software. Buy for $149. & site licenses. Freeware student/evaluation download
Winsteps Rasch measurement software. Buy for $149. & site licenses. Freeware student/evaluation download

State-of-the-art : single-user and site licenses : free student/evaluation versions : download immediately : instructional PDFs : user forum : assistance by email : bugs fixed fast : free update eligibility : backwards compatible : money back if not satisfied
 
Rasch, Winsteps, Facets online Tutorials

 

Forum Rasch Measurement Forum to discuss any Rasch-related topic

 

To receive News Emails about Winsteps and Facets,
enter your email address here:

I want to Subscribe: & click below
I want to Unsubscribe: & click below

Please set your SPAM filter to accept emails from Winsteps.com

 

www.winsteps.com welcomes your comments or questions:

Your email address (if you want us to reply):

 
 

 

Rasch Publications
Rasch Measurement Transactions (free, online) Rasch Measurement research papers (free, online) Probabilistic Models for Some Intelligence and Attainment Tests, Georg Rasch Applying the Rasch Model 3rd. Ed., Bond & Fox Best Test Design, Wright & Stone
Rating Scale Analysis, Wright & Masters Introduction to Rasch Measurement, E. Smith & R. Smith Introduction to Many-Facet Rasch Measurement, Thomas Eckes Invariant Measurement: Using Rasch Models in the Social, Behavioral, and Health Sciences, George Engelhard, Jr. Statistical Analyses for Language Testers, Rita Green
Rasch Models: Foundations, Recent Developments, and Applications, Fischer & Molenaar Journal of Applied Measurement Rasch models for measurement, David Andrich Constructing Measures, Mark Wilson Rasch Analysis in the Human Sciences, Boone, Stave, Yale
in Spanish: Análisis de Rasch para todos, Agustín Tristán Mediciones, Posicionamientos y Diagnósticos Competitivos, Juan Ramón Oreja Rodríguez
Winsteps Tutorials Facets Tutorials Rasch Discussion Groups

 


 

 
Coming Rasch-related Events
July 31 - Aug. 3, 2017, Mon.-Thurs. Joint IMEKO TC1-TC7-TC13 Symposium 2017: Measurement Science challenges in Natural and Social Sciences, Rio de Janeiro, Brazil, imeko-tc7-rio.org.br
Aug. 7-9, 2017, Mon-Wed. In-person workshop and research coloquium: Effect size of family and school indexes in writing competence using TERCE data (C. Pardo, A. Atorressi, Winsteps), Bariloche Argentina. Carlos Pardo, Universidad Catòlica de Colombia
Aug. 7-9, 2017, Mon-Wed. PROMS 2017: Pacific Rim Objective Measurement Symposium, Sabah, Borneo, Malaysia, proms.promsociety.org/2017/
Aug. 10, 2017, Thurs. In-person Winsteps Training Workshop (M. Linacre, Winsteps), Sydney, Australia. www.winsteps.com/sydneyws.htm
Aug. 11 - Sept. 8, 2017, Fri.-Fri. On-line workshop: Many-Facet Rasch Measurement (E. Smith, Facets), www.statistics.com
Aug. 18-21, 2017, Fri.-Mon. IACAT 2017: International Association for Computerized Adaptive Testing, Niigata, Japan, iacat.org
Sept. 15-16, 2017, Fri.-Sat. IOMC 2017: International Outcome Measurement Conference, Chicago, jampress.org/iomc2017.htm
Oct. 13 - Nov. 10, 2017, Fri.-Fri. On-line workshop: Practical Rasch Measurement - Core Topics (E. Smith, Winsteps), www.statistics.com
Jan. 5 - Feb. 2, 2018, Fri.-Fri. On-line workshop: Practical Rasch Measurement - Core Topics (E. Smith, Winsteps), www.statistics.com
Jan. 10-16, 2018, Wed.-Tues. In-person workshop: Advanced Course in Rasch Measurement Theory and the application of RUMM2030, Perth, Australia (D. Andrich), Announcement
Jan. 17-19, 2018, Wed.-Fri. Rasch Conference: Seventh International Conference on Probabilistic Models for Measurement, Matilda Bay Club, Perth, Australia, Website
April 13-17, 2018, Fri.-Tues. AERA, New York, NY, www.aera.net
May 25 - June 22, 2018, Fri.-Fri. On-line workshop: Practical Rasch Measurement - Core Topics (E. Smith, Winsteps), www.statistics.com
June 29 - July 27, 2018, Fri.-Fri. On-line workshop: Practical Rasch Measurement - Further Topics (E. Smith, Winsteps), www.statistics.com
Aug. 10 - Sept. 7, 2018, Fri.-Fri. On-line workshop: Many-Facet Rasch Measurement (E. Smith, Facets), www.statistics.com
Oct. 12 - Nov. 9, 2018, Fri.-Fri. On-line workshop: Practical Rasch Measurement - Core Topics (E. Smith, Winsteps), www.statistics.com
The HTML to add "Coming Rasch-related Events" to your webpage is:
<script type="text/javascript" src="http://www.rasch.org/events.txt"></script>

 

 

For more information, contact Winsteps.com by e-mail using the comment form above.
Our current URL is www.winsteps.com

Winsteps® is a registered trademark
 


 

 

New and on-going: Masterchef Australia 2017: Rasch Measurement of Cooks

 

 
John "Mike" Linacre, author of Winsteps, and Jenny use and recommend eco-friendly, highly effective beauty and wellness products such as skincare