Hello
Right now I have a batch file that closes outlook and copies the pst to a user folder on the server.
Problem is that I do not want to copy all pst files from each computer (some may be archives etc.. I only want the currently used pst.
Is there a line of code I can use to find the reg key that tells outlook where the data file is (pst)? Could be windows xp, 7 or 8
Currently, not all clients are consistent as to where the pst file is because there are different versions of windows. And the pst file is named by their email@address.com.pst (in most cases).
Thank you for any help you can provide.
Terry
Right now I have a batch file that closes outlook and copies the pst to a user folder on the server.
Problem is that I do not want to copy all pst files from each computer (some may be archives etc.. I only want the currently used pst.
Is there a line of code I can use to find the reg key that tells outlook where the data file is (pst)? Could be windows xp, 7 or 8
Currently, not all clients are consistent as to where the pst file is because there are different versions of windows. And the pst file is named by their email@address.com.pst (in most cases).
Code:
Rem vb script that closes all instances of outlook.
CloseOL.vbs
Rem give the outlook file time to close tmps
timeout /t 7 /nobreak
Rem if the destination folder does not already exist, create it.
if not exist %HOMESHARE%\Outlook Files mkdir %HOMESHARE%\Outlook Files
Rem Copies all PST files in the current users' profile to the network share
copy "%UserProfile%\Documents\Outlook Files\*.pst" "%HOMESHARE%\Outlook Files\*.pst" /y
pause
Rem Restarts Microsoft Outlook
start Outlook.exe
exit
Terry
Last edited:
