I found my answer, I removed the “&” and just inserted the variable into the file.
I was thinking about VB when I was doing it.
I case anyone wants to see the fixed bat file it is below and the application I am using can be found here
This is a great tool and totally automates the scanpst file.
REM ***This batch file will automatically run SCANPST on every PST file in the
REM ***directory specified by PST_FILE_MASK.
set SCANPST_PATH=”C:\Program Files\Microsoft Office\Office12\SCANPST.EXE”
set PST_FILE_MASK=”C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Outlook\*.pst”
REM *** CD into in the directory that contains the launched bacth file…
for %%i in (%PST_FILE_MASK%) do (
REM Add an N to the end of the following line of you don’t want backup files
cscanpst.exe %SCANPST_PATH% “%%i” N
if errorlevel 3 goto done