Require number of files
Require number of files
Is there a way to require a set number of files? I created a task to move files from one directory to another directory. However, I do not want Syncovery to move any files if I don't have the correct number of files (14). So if Syncovery does not detect 14 files, I do not want it to run. I checked the box to "Copy Only 14 Files per run" but this is not a required count and it does not prevent Syncovery from running when there are less than 14 files.
Re: Require number of files
Hello,
right now it's not possible but I will add a PascalScript hook for you so the validity of the profile actions can be verified before letting it perform them.
right now it's not possible but I will add a PascalScript hook for you so the validity of the profile actions can be verified before letting it perform them.
Re: Require number of files
Hello,
you will now find the new version 9.40beta1 on our download page. It allows you to use the following PascalScript. The profile will only enter the main action phase if there are exactly 14 files to be copied (or moved) from left to right.
This can be entered when editing a profile in Advanced Mode, via the Job tab sheet and the "Pascal Script" checkbox.
For more information about PascalScript, please see:
https://www.syncovery.com/pascalscript/
you will now find the new version 9.40beta1 on our download page. It allows you to use the following PascalScript. The profile will only enter the main action phase if there are exactly 14 files to be copied (or moved) from left to right.
Code: Select all
function OnBeforeMainActionPhase(const CopyL2RCount,CopyR2LCount,DeleteLCount,DeleteRCount,MoveLCount,MoveRCount:Int64;
const CopyL2RBytes,CopyR2LBytes,DeleteLBytes,DeleteRBytes,MoveLBytes,MoveRBytes:Int64):Boolean;
begin
if CopyL2RCount=14 then
Result:=true
else begin
Result:=false;
Log('Not continuing because CopyL2RCount is '+IntToStr(CopyL2RCount));
end;
end;
For more information about PascalScript, please see:
https://www.syncovery.com/pascalscript/