-1

Can anyone help me with a (simple as possible) batch file I can unleash on a users profile to search for PST files. I would need to see the location of any PST files that were found.

Thanks all

user1986920
  • 15
  • 1
  • 4

2 Answers2

0

About as simple as it gets :)

dir C:\*.pst /s /b
Bali C
  • 30,582
  • 35
  • 123
  • 152
  • No worries bud. If this answered your question you can accept it by clicking the tick next to it. – Bali C Jan 17 '13 at 14:26
0

Variable %USERPROFILE% gives the profile directory of currently logged in user. You can use the DIR command to list all the *.PST files recursively under that. The simplest script would be

ECHO using directory %USERPROFILE%

DIR /B /P /S %USERPROFILE%\*.PST

You can change the switches of DIR command to format the output.

Ajit
  • 56
  • 2