Error level

Discuss new features and functions
Posts: 9
Joined: 21 Sep 2011

geoff987654

I realy like this program and the uncompromising approach it takes.
I am having a little problem with automatinhg the process.

If I set HandleError section of the SyncJob.ffs_batch file to Exit
Freefilesync returns a non zero errorlevel when there are un resolved
confilcts.
However if I set it to Ignore the errorlevel is always zero. This seem to be
at odds with comment made it other post on this forum.
I am using realsync to run Filesync in the silent mode. I what it to complete
the compair and sync all non conflict updates.
If the errorlevel is not zero filesync will be run in the normal mode and
display just the confilcts to the user for resolution.
Do I need to do something else to get a non zero errorlevel in the Ignore
mode.
see the batch file below.

Geoff


<?xml version="1.0" encoding="UTF-8"?> 
<FreeFileSync XmlType="BATCH"> 
<MainConfig> 
<Comparison> 
<Variant>ByTimeAndSize</Variant> 
<HandleSymlinks>Ignore</HandleSymlinks> 
</Comparison> 
<SyncConfig> 
<Variant>Automatic</Variant> 
<CustomDirections> 
<LeftOnly>right</LeftOnly> 
<RightOnly>left</RightOnly> 
<LeftNewer>right</LeftNewer> 
<RightNewer>left</RightNewer> 
<Different>none</Different> 
<Conflict>none</Conflict> 
</CustomDirections> 
<DeletionPolicy>MoveToCustomDirectory</DeletionPolicy> 
<CustomDeletionFolder>Z:\geoff\sec copy backup</CustomDeletionFolder> 
</SyncConfig> 
<GlobalFilter> 
<Include>*</Include> 
<Exclude>\System Volume Information\&#x0A;\RECYCLED\&#x0A;\RECYCLER\&#x0A;\$Re
cycle.Bin\&#x0A;\desktop.ini&#x0A;*\Thumbs.db&#x0A;*\~*</Exclude> 
<TimeSpan>0</TimeSpan> 
<UnitTimeSpan>Inactive</UnitTimeSpan> 
<SizeMin>0</SizeMin> 
<UnitSizeMin>Inactive</UnitSizeMin> 
<SizeMax>0</SizeMax> 
<UnitSizeMax>Inactive</UnitSizeMax> 
</GlobalFilter> 
<FolderPairs> 
<Pair> 
<Left>F:\Users\Geoff Documents</Left> 
<Right>Z:\Geoff documents</Right> 
<LocalFilter> 
<Include>*</Include> 
<Exclude/> 
<TimeSpan>0</TimeSpan> 
<UnitTimeSpan>Inactive</UnitTimeSpan> 
<SizeMin>0</SizeMin> 
<UnitSizeMin>Inactive</UnitSizeMin> 
<SizeMax>0</SizeMax> 
<UnitSizeMax>Inactive</UnitSizeMax> 
</LocalFilter> 
</Pair> 
</FolderPairs> 
</MainConfig> 
<BatchConfig> 
<Silent>true</Silent> 
<LogfileDirectory>C:\ProgramData\Freefilesync\logs</LogfileDirectory> 
<LogfileCountMax>200</LogfileCountMax> 
<HandleError>Ignore</HandleError> 
</BatchConfig> 
</FreeFileSync>
User avatar
Site Admin
Posts: 7051
Joined: 9 Dec 2007

Zenju

> However if I set it to Ignore the errorlevel is always zero
Warnings that are ignored, automatically or by the user, are not seen as an
error, so the return code is "success"(0). If you want to start GUI mode from
within a batch job, the best way is to set error handling to "popup". The
warning dialog will contain button "switch" which will do just that.