How to establish a .bat file of CASTEP under Windows-XP

It's convenient to use batch processing to do some repeated works, here I tried to write a .bat file to run castep.

Point "Files"---->"save files", then establish a .bat file as follows:

@echo on

cd D:\"Materials Studio Projects"\"Ni_Fe_TiC Files"\Documents\"Ni CASTEP Energy"
call C:\"Program Files"\Accelrys\"Materials Studio 5.0"\etc\CASTEP\bin\RunCASTEP -np 2 Ni

cd D:\"Materials Studio Projects"\"Ni_Fe_TiC Files"\Documents\"Ni CASTEP Energy (2)"
call C:\"Program Files"\Accelrys\"Materials Studio 5.0"\etc\CASTEP\bin\RunCASTEP -np 2 Ni

pause


Save this .bat file, then double click it.

But it failed to read Ni.param file, althrough this file has been established.