Created
May 19, 2018 18:44
-
-
Save bigjosh/e62f82125adbe065969393dc674f16c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 (x86)\Microsoft Office\root\Office16\SCANPST.EXE" | |
set PST_FILE_MASK="D:\Users\josh\Documents\My Mail\*.pst" | |
REM *** CD into in the directory that contains the launched batch file... | |
echo CDing into "%~dp0" | |
pushd "%~dp0" | |
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 | |
:loop | |
echo checking files %SCANPST_PATH% "%%i" No backup for repair | |
cscanpst.exe %SCANPST_PATH% "%%i" N | |
echo Finished checking files %SCANPST_PATH% "%%i" | |
if errorlevel 3 goto exit | |
if errorlevel 1 goto loop | |
:exit | |
ECHO %SCANPST_PATH% "%%i" File scanned clean! | |
) | |
:done | |
@echo Log: | |
@type cscanpst.log | |
@pause | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment