My end users have Outlook pst files scattered all over their c drive. I came up with this batch file to find them and copy them to the end user's M drive.
rem **************************************************
@echo off
if not exist m:\migration mkdir m:\migration
if not exist m:\migration\pst mkdir m:\migration\pst
c:
dir /b c:\*.pst /s > m:\migration\pathdata.txt
pause
for /f "tokens=1 delims=" %%a in (m:\migration\pathdata.txt) do (copy "%%a" m:\migration\pst)
pause
BUT this paltry solution can't handle if the files have the same name, which is to be expected (archive.pst)
I was hoping to use xcopy to copy them and create their directory structure on drive M, that way files with the same names wont overwrite each other. But I have failed.
Any ideas? Thank you for helping me with this