WIN

  • 01 Aug

    How to scan a folder to look for a number of files, then start the transfer?

    Q: How to scan a folder to look for a number of files, then start the transfer? We are a licensed customer of Limagito. Is it possible to scan a folder to look for 6 files, then start the transfer?  If there are less than 6 files, none of the files are transferred.

    A: This is possible with a Windows folder/Share [WIN] as Source. We added some screenshots to get you started.

    • Add Windows folder/share as Source:

    limagito file mover source setup

    •  Open our Pascal Script option:

    limagito file mover pascal script option

    • Please enable and add the following ‘On Rule Begin’ Pascal Script (script attached in txt file). You can modify the amount (ctMinFiles) or search filter (*.*) if needed.
    Var
      tmpCounter: Integer;
    Const
      ctMinFiles = 6;
    Begin
      psExitCode := 0;
      // ... add your code here
      // If you want to scan subirectories
      // tmpCounter := psCountFiles(psSourcePath, '*.*', True);
      // In this example we will not scan the subdirectories of the source folder
      tmpCounter := psCountFiles(psSourcePath, '*.*', False);
      If tmpCounter >= ctMinFiles Then
      Begin
        psLogWrite(1, '', 'Files count successful: ' + IntToStr(tmpCounter));     
        psExitCode := 1;
      End  
      Else
        psLogWrite(1, '', 'Not enough files, count: ' + IntToStr(tmpCounter));     
    End.

    limagito file mover look for a number of files

    • Click F9 and check the log window in the Pascal Script setup. It should show ‘Compiled Successfully’.

    limagito file mover pascal script compile result

     

    If you need any info about this ‘look for a number of files’ question, please let us know.

    Best regards,

    Limagito Team

  • 18 Jul

    How to copy files from an FDA regulated equipment without modifying

    Q: We are trying to run a copy of files from an FDA regulated equipment to an external NAS. That part we’ve got down. Works great.  The item that I have not figured out is that since these are regulated devices. Files cannot be modified. If they are, there’s an issue. Is there a way so that if a file has been modified on the source, it is NOT copied to the destination NAS with the same name, but instead is copied with a rename function tied to is (such as extending the name with ‘changed-yyyymm hhmm’) or similar.   Newly created files, would be copied with their original names in place. Only modified/changed flies would be renamed. Would this have to be a second copy rule or can we do all of this within one. Thanks for the assistance.

    A: this option is available under the “File & Directory” tab of your Windows as Destination setup:

    • Please adjust “File Options” to: “Add dot datetime (pre-ext) suffix if exists”. DateTime suffix format will be YYYMMDDHHNNSS.
      • This “Add dot datetime (pre-ext) suffix if exists” option was added in v2023.7.10.0

    limagito file mover FDA regulated equipment

    #mft #filetransfer #filemanagement

    If you need any info about this “FDA regulated equipment” question, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team How-to WIN ,
  • 28 May

    Delete all contents of a destination folder before files are moved

    Q: Is there a way to delete all contents of a destination folder before files are moved/not just overwriting them? I am unzipping a large folder with files daily, most files are named the same thing so they can overwrite them. Have a few that are named with dates and times so they just end up staying in the folder.

    A: If the unzip folder is always the same, the following solution could help you. We added a script that will delete all files and subfolders when ‘On Rule Begin’ is triggered. The path you need to use in the script is the one you will use in your UNZIP as Destination setup.

    – Open Pascal Script Setup

    limagito file mover pascal script

    • Enable and Add the following ‘On Rule Begin’ Pascal Script. In this example our Unzip path = C:\Test\Out\UNZIP\

    Don’t forget to adjust the ctOutputPath const, must end with a \

    Const
      ctOutputPath = 'C:\Test\Out\UNZIP\';
    Begin
      psExitCode:= 1;
      // ... add your code here
      psLogWrite(1, '', 'Delete Tree: ' + ctOutputPath);
      psDeleteFiles(ctOutputPath, '*.*');
      psDeleteTree(ctOutputPath, True);
    End.

    Delete all contents of a destination

    #filetransfer #mft #filemanagement

    If you need any info  about this ‘Delete all contents of a destination’ request, please let us know.

    Best regards,

    Limagito Team

    By Limagito-Team Pascal Script WIN ZIP ,
1 2 3 4 5 6 10
SEARCH