Guest User

Untitled

a guest
May 24th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. REM ***This batch file will automatically run SCANPST on every PST file in the
  2. REM ***directory specified by PST_FILE_MASK.
  3.  
  4. set SCANPST_PATH="C:\Program Files (x86)\Microsoft Office\root\Office16\SCANPST.EXE"
  5. set PST_FILE_MASK="D:\Users\josh\Documents\My Mail\*.pst"
  6.  
  7. REM *** CD into in the directory that contains the launched batch file...
  8. echo CDing into "%~dp0"
  9. pushd "%~dp0"
  10.  
  11. for %%i in (%PST_FILE_MASK%) do (
  12.  
  13. REM Add an N to the end of the following line of you don't want backup files
  14. :loop
  15. echo checking files %SCANPST_PATH% "%%i" No backup for repair
  16. cscanpst.exe %SCANPST_PATH% "%%i" N
  17. echo Finished checking files %SCANPST_PATH% "%%i"
  18. if errorlevel 3 goto exit
  19. if errorlevel 1 goto loop
  20. :exit
  21. ECHO %SCANPST_PATH% "%%i" File scanned clean!
  22. )
  23. :done
  24.  
  25. @echo Log:
  26. @type cscanpst.log
  27.  
  28. @pause
Add Comment
Please, Sign In to add comment