none
Locked Files RRS feed

  • Question

  • I have sync toy setup to sync my outlook .pst folders. I also have it setup to run through the windows scheduled task process a couple of times a day.

    If I'm in outlook, in which case the files would be locked, synctoy is putting a file with 0 bytes in my right side folder. Seems to me it should just skip the file and that way at least I would have the last good version. Is there an option to skip locked files somewhere that I'm missing?
    Saturday, April 4, 2009 12:29 PM

Answers

  • I have sync toy setup to sync my outlook .pst folders. I also have it setup to run through the windows scheduled task process a couple of times a day.

    If I'm in outlook, in which case the files would be locked, synctoy is putting a file with 0 bytes in my right side folder. Seems to me it should just skip the file and that way at least I would have the last good version. Is there an option to skip locked files somewhere that I'm missing?

    HI JD,

    Your issue can be repro on my machine, Synctoy 2.0 has overwrite 0 bytes file to the target folder ONLY on outlook is running and locking the data file.

    Anyway, I did not found out a good way to workaround, please make sure shutdown outlook before you run a sync.

    If you are good at VB Script or WMI programming, you may write a simple script to detection Outlook running status, you may skip sync when outlook is running, or just shutdown it.

    hope can give you a hand, thanks.



    Joey Liang
    Your potential our passion This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, April 9, 2009 8:54 AM

All replies

  • I have sync toy setup to sync my outlook .pst folders. I also have it setup to run through the windows scheduled task process a couple of times a day.

    If I'm in outlook, in which case the files would be locked, synctoy is putting a file with 0 bytes in my right side folder. Seems to me it should just skip the file and that way at least I would have the last good version. Is there an option to skip locked files somewhere that I'm missing?

    HI JD,

    Your issue can be repro on my machine, Synctoy 2.0 has overwrite 0 bytes file to the target folder ONLY on outlook is running and locking the data file.

    Anyway, I did not found out a good way to workaround, please make sure shutdown outlook before you run a sync.

    If you are good at VB Script or WMI programming, you may write a simple script to detection Outlook running status, you may skip sync when outlook is running, or just shutdown it.

    hope can give you a hand, thanks.



    Joey Liang
    Your potential our passion This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, April 9, 2009 8:54 AM
  • Hi -

    Joey is right about there not being a good workaround currently. We will fix this in a future release however.

    Thanks
    Deepa
    Deepa ( Microsoft Sync Framework)
    Monday, April 13, 2009 9:58 PM
    Moderator
  • Hi -

    Joey is right about there not being a good workaround currently. We will fix this in a future release however.

    Thanks
    Deepa
    Deepa ( Microsoft Sync Framework)

    Hi!
    In another post I saw the following solution proposed - but I am not technical. My question: what do I do with the Notepad file to make this work?  Also, how can I check that this will not badly affect my Outlook.pst (it's too important to screw with, and Outlook is tricky to fix when it goes wrong!!)

    Quote:
     

    Using the following script, locked files such as outlook .pst or .ost can be copied whilst in use.

     

    Copy the following lines (down to just before 'Notes:') into notepad and save as SyncToyVSS.bat in directory C:\Program Files\SyncToy 2.0 Beta:

     

    setlocal

     

    If EXIST "%SCRIPT%" GOTO :COPY_FILE

     

    FOR /F "tokens=1-3 delims=/:. " %%d IN ("%DATE%") DO set create_date=%%d%%e%%f

    FOR /F "tokens=1-4 delims=/:. " %%t IN ("%TIME%") DO set create_time=%%t%%u%%v%%w

    set SCRIPT=%create_date%%create_time%.cmd

    cd c:\Outlook

     

    vshadow.exe -script=%SCRIPT% -exec="C:\Program Files\SyncToy 2.0 Beta\SyncToyVSS.bat" C:

     

    @goto :EOF

     

    :COPY_FILE

    setlocal

     

    call %SCRIPT%

     

    @REM Copy individual file use: copy %SHADOW_DEVICE_1%\\test1\test.pst c:\test2\test.bak

    @REM or to copy whole directory content use:

     

    copy %SHADOW_DEVICE_1%\"\Documents and Settings\<user>\Local Settings\ApplicationData\Microsoft\Outlook" c:\Outlook

     

    del /f "%SCRIPT%"

     

    cd C:\Program Files\SyncToy 2.0 Beta

    SyncToyCmd -ROutlook

     

     

    Notes:

    Volume Shadow Copy Service SDK 7.2

    Use http://msdn2.microsoft.com/en-us/library/bb530725(VS.85).aspx

    Download here: http://www.microsoft.com/downloads/details.aspx?FamilyID=0b4f56e4-0ccc-4626-826a-ed2c4c95c871&displaylang=en

    Unpack, default should be in C:\Program Files\Microsoft\VSSSDK72,

    Copy two files: vshadow.exe and vshadow.pdb from C:\Program Files\Microsoft\VSSSDK72\TestApps\vshadow\bin\release-xp to C:\WINDOWS\system32

     

    As an example using the above script, create a temporary folder c:\Outlook – this will be the folder shadow copying will copy files to.

    Run SyncToy and setup a folder pair called Outlook to sync left folder c:\Outlook to right folder where you’ll sync to e.g. \\backup\Outlook

    Alter the following script to suit your directories that you’ll want copied e.g. for default PST or OST files location you’ll need to amend <user> to your logon name in the script on the ‘copy’ line.

     

    Finally setup a Scheduled Task to run SyncToyVSS.bat, to run in silent mode see this post:

    http://forums.microsoft.com/sync/ShowPost.aspx?PostID=2894255&SiteID=75

     

    The script does not test for available free space so consideration required if copying complete directory.

     

    I run on MCE2005 with Office 2007 and is OK.

     

    Obviously amend script where necessary for your directories and file names etc.

     

    Kind regards, Jim.

    end quote

    Wednesday, July 8, 2009 9:35 AM