DPOF Profile Setup

Create a new Profile

Add a Provile Name

For the "Left Hand Side" select the folder where the DPOF Order folders are located. This will probably be in the Artwork Folder

For the Right Hand Side select the hotfolder where your Lab Printer Software is reciving the orders

Make sure Copying Directions Left to Right is selected

Select "Move Files to Destination"

Next Select "Files" from Advanced Settings - see below

Untick "Detect Moved Files and Renamed Folders...."

Again from Advanced Setting - Select "Folders"

Untick "Remove Folders That Were Emptied"

Remaining on "Advanced Settings" - Select "Job"

Tick "PascalScript"

A Pop Up box will appear

Copy and Paste the following Script

function OnBeforeFileCopy(const DirectionIsL2R:Boolean;
        var Source,Dest,DestPath,LeftSubPath,RightSubPath:UnicodeString):Boolean;
var NewDestPath,NewDest,NewRightSubPath:UnicodeString;
    p:Integer;
begin
  Result:=true;
  if not DirectionIsL2R or (RightSubPath='') then
     Exit;

  if RightSubPath[1]<>RightDelim then
     RightSubPath:=RightDelim+RightSubPath;

  if Length(RightSubPath)<2 then
     Exit;

  if RightSubPath[2]=RightDelim then // sanity check
     Exit;

  p:=2;
  while RightSubPath[p]<>RightDelim do begin
     Inc(p);
     if p>Length(RightSubPath) then
        break;
     end;

  if p>Length(RightSubPath) then
     NewRightSubPath:=''
  else begin
    // now p points to the second PathDelim
    // and we want to remove the subfolder before it

    NewRightSubPath:=Copy(RightSubPath,p,Length(RightSubPath)-p+1);
    end;

  Log('Making NewDestPath');
  NewDestPath:=ConcatPathWithDelim(RightBasePath,NewRightSubPath,RightDelim);
  Log('Making NewDest');
  NewDest:=ConcatPathWithDelim(NewDestPath,ExtractFileName(Dest),RightDelim);

  if not MakeSurePathExists(NewDestPath,true) then begin
     Log('Could not create '+NewDestPath);
     Exit;
     end;

  Log('OnBeforeFileCopy');
  Log('Source:'+Source);
  Log('DestPath:'+DestPath+' changed to '+NewDestPath);
  Log('Dest:'+Dest+' changed to '+NewDest);
  Log('LeftSubPath:'+LeftSubPath);
  Log('RightSubPath:'+RightSubPath+' changed to '+NewRightSubPath);
  Log('');

  Dest:=NewDest;
  DestPath:=NewDestPath;
  RightSubPath:=NewRightSubPath;
  end;

function OnBeforeFolderCreate(const DirectionIsL2R:Boolean;
                              var Source,Dest,Reason:UnicodeString):Boolean;
begin
  Reason:='no need to create folders separately';
  Result:=false;
  end;

Click on OK

Finally Set this profile to run on a schedule

Click on OK

Make sure the Profile is set to Run

Last updated