File Mover Blog

  • 18 Jul

    How to move a folder tree and files when the subfolder matches my criteria

    Q: How to move a folder tree and files when the subfolder matches my criteria. I want to move a folder tree (with his files) from « home » only when the level 2 subfolder match “pour_ftv_editorial”.  The source is FTP and destination is Windows folder.

    Limagito  check the source folder « home »

    Limagito move in the destination folder « home_out »

    • SOURCE (FTP)

    limagito file mover move a folder tree

    • Destination (Windows Folder)

    limagito file mover move a folder tree

    A: This should be possible using the following “Directory filter”:

    • Enable “Include Subdirectories to allow us to scan the subfolders of your Source.
    • Enable “Exclude Basedirectory” because we don’t want to pickup files from the Root Source folder.

    limagito file mover subdirectory filter

    • As Include Directory name filter we will use: */pour_ftv_editorial/*

    limagito filemover directory filter

    limagito file mover directory filter

    Feedback user: “it works! Great”

    #mft #filetransfer #filemanagement

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

    Best regards,

    Limagito Team

    By Limagito-Team Filters
  • 07 Jul

    Sharepoint problem with filenames in Thai language

    Q: Sharepoint problem with filenames in Thai language not transfer host to destination. How to resolve?
    A: In version 2023.7.7.0 we added a new “Accept Charset” option under the “Common” Tab. Could you please set this to: utf-8

    limagito file mover sharepoint thai language

    #sharepoint #mft #filetransfer

    If you need any info about this “Thai language” issue, please let us know.

    Best regards,

    Limagito Team

     

  • 29 Jun

    How to increment the date in a filename by plus one day

    Q: Is it possible to rename a file containing a date string when copying it to increment the date in the filename by plus one day?

    where yyyymmddxx_I.p1.pdf the yyyymmdd will increase by +1

    Examples

    • Input: 2022010501_I.p1.pdf
      • Output: 2022010601_I.p1.pdf
    • Input: 2023123101_I.p1.pdf
      • Output: 2024010101_I.p1.pdf

    A: Yes this is possible. Please have a look at the following screenshots.

    • We used a Windows folder as Source (can be any other type of Source too):

    limagito file mover windows folder as source

    • Open our Pascal Script option:

    limagito file mover pascal script option

    • Enable and Add the following ‘On Destination’ Pascal Script:
    Var
     tmpFilename, tmpDateStr: String;
     tmpDate: TDateTime;
    Const
      ctDateFormatOld = 'YYYYMMDD'; ctDateSepOld = #0;
      ctDateFormatNew = 'YYYYMMDD';
    Begin
    (*
    Example:
    Input: 2022010501_I.p1.pdf
    Output: 2022010601_I.p1.pdf
    *)
      psExitCode:= 0;
      // ... add your code here
      tmpFilename := psFilename;
      If length(tmpFilename) >= 8 Then
      Begin
        Try
          tmpDateStr := Copy(tmpFilename, 1, Length(ctDateFormatOld));
          tmpDate := psStrToDate(tmpDateStr, ctDateFormatOld, ctDateSepOld);
          tmpDate := psIncDay(tmpDate, 1);
          psVSA := FormatDateTime(ctDateFormatNew, tmpDate);
          psExitCode:= 1;
        Except
          psLogWrite(1, '', 'Strip Date from File exception on ' + psFilePath + psFilename);
        End;
      End
      Else
      Begin
        psLogWrite(1, '', 'Strip Date length of File error on ' + psFilePath + psFilename);
      End;
    End.
    

    limagito file mover pascal script setup

    • Open our Destination setup

    limagito file mover destination setup

    • We used a Windows folder as Destination:

    limagito file mover windows folder as destination

    • Enable ‘Rename Files during Copy/Move’ and click the ‘Rename Filter Setup’ button:

    limagito file mover file rename option

    • Add the following ‘File Rename’ setup:
      • RegEx:  .{8}(.*)
      • Replacement:  %VSA\1

    limagito file mover file rename setup

    • RunTime Log result:

     

    limagito file mover runtime log result

    #mft #Filetransfer #rename

    If you need any info about this “increment the date in a filename” request, please let us know.

    Best regards,

    Limagito Team

1 20 21 22 23 24 25 26 135
SEARCH