File Mover Blog

  • 26 May

    Image and sidecar xml workflow question

    Q: We have a new process that backs up and then moves an image file and sidecar xml file into an input directory [folder A] for our automated photo toning software.
    The xml file contains instructions for cropping and has the same name as the image file with the exception of their file extensions, for example 230519_511627666.xml and 230519_511627666.jpg.
    The photo toning software ingests both the .xml and .jpg and attempts to tone the image, but if the .jpg fails it is output to an error folder [B] without being cropped and toned.
    We pick up the errored .jpg from folder B, resize it with other software and drop it to another folder [C].
    We need to then move the .jpg from folder C back to input folder A to try it again, but it requires its corresponding .xml file which can be found in the backup folder [D] be dropped alongside it again to process and tone.
    Is it possible with a Limagito rule to monitor source folder C and if an image file is found, grab the .xml file of the same name from folder D, then drop them both to folder A?
    Hope that makes sense! Thanks, David

    A: Yes, should be possible. We’ll prepare a script for this asap.

    • We created the following directory structure for the test of the script:

    Image and sidecar xml

    • Source is the C folder (resized files):

    Limagito file mover windows as source

    • Filename Include Filter, we only want to scan for jpg files:

    limagito file mover filename include filter

    • Enable and add ‘On Destination’ Pascal Script:

    limagito file mover pascal script

    • Don’t forget to adjust the Path const values:
    var
      tmpFilename: String;
    Const
      // Path must end with a \
      ctBackupPath = 'C:\Test\AJC\D\';
      ctDestinationPath = 'C:\Test\AJC\A\';
    Begin
      psExitCode:= 0;
      tmpFilename := ChangeFileExt(psFileName, '.xml');
      If FileExists(ctBackupPath + tmpFilename) Then
      Begin
        If psCopyFile(ctBackupPath + tmpFilename, ctDestinationPath + tmpFilename, False) Then
        Begin
           psExitCode:= 1;
           psLogWrite(1, '', 'Copy file success of ' + ctBackupPath + tmpFilename + ' to ' + ctDestinationPath + tmpFilename);
        End
        Else
        Begin
          psLogWrite(1, '', 'Copy file error of ' + ctBackupPath + tmpFilename + ' to ' + ctDestinationPath + tmpFilename);
        End;
      End
      Else
        psLogWrite(1, '', 'Error, xml file does not exist: ' + ctBackupPath + tmpFilename);
    End.
    

    limagito file mover pascal script as destination

    Feedback user:

    • Thank you, I’ll try this out and let you know if I have any issues with it. Appreciate the quick response!
    • Just wanted to update, this rule and script appears to work great and I have it in place in our production workflow now, thanks again!

    #filetransfer #mft #filemanagement

    If you need any info  about this ‘Image and sidecar xml workflow question’, please let us know.

    Best regards,

    Limagito Team

     

    By Limagito-Team Image Pascal Script , ,
  • 14 May

    New counters added in Limagito File Mover

    Newly added in Limagito File Mover recently:

    Values total counters (history):

    • psTotalFiles Counter:  %CSC
    • psTotalFilesSrcError Counter:  %CFS
    • psTotalFileDstError Counter:  %CFD
    • psTotalControlSrc Counter:  %CCS
    • psTotalControlDst Counter:  %CCD

    The following counters will reset themself On Rule Begin:

    • psCurrentsFiles Counter:  %ZSC
    • psCurrentFilesSrcError Counter:  %ZFS
    • psCurrentFilesDstError Counter:  %ZFD
    • psCurrentControlSrcError Counter:  %ZCS
    • psCurrentControlDstError Counter:  %ZCD

    limagito file mover counter parameters

    These can be used for example in email events.

    New counters added and used in email events

     

    Result of sent email:

    New counters added in email example

    These counters are also available as Pascal Script var so this means you can control only to send an error email if for example the value of an error counter reaches a certain value.

    limagito file mover on error event

    Important, enable ‘Use Pascal Script as Event Precondition’ in the options tab:

    use pascal script as precondition in limagito file mover

    You can create any combination of our counters to determine when the error event should actually be sent. Please let us know if you need any help here.

    limagito file mover pascal script as precondition using counters

    An example of the the new counters being used in our Pascal Script ‘On Rule End’ option:

    New counters added in our file mover pascal script option

    RunTime Log Result:

    New counters added in our file mover pascal script option

    #filetransfer #mft #filemanagement

    If you need any info  please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team How-to Pascal Script
  • 09 May

    I want to save the files to a sent folder after uploading to FTP

    A: I want to save the files to a sent folder after uploading to FTP?

    We look for files from a Windows Source and then send them to a FTP site. Destination memory is enabled so files are only ever sent once.  I want to save the sent files in Windows SENT folder as once they go to the customer FTP site they move or delete the files so we also store them on our side.

    Q: This is possible. You’ll need to add two destinations:

    • Destination 1 would be the FTP server (Important, must be the first Destination)
    • Destination 2 would be the Windows SENT folder

    limagito file mover destination setup

    In the Function Setup, please enable ‘Destination Memory  & Exit cylcus on Error’. In this case only when FTP succeeds the file will go to the Windows SENT folder. If it doesn’t succeed we’ll try to send the file to the FTP destination again during the next scan.

    limagito file mover function setup

    #filetransfer #ftp #mft

    If you need any info  about this request, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team Backup FTP ,
1 25 26 27 28 29 30 31 136
SEARCH