WIN

  • 01 Oct

    Immediate folder name as filename in Limagito File Mover

    Q: I am trying to append a folder name to a file name but having a little trouble. The file is under 1 or 2 subfolder. After the file move I would like to append the very last folder name to the file name , and I don’t want to copy the source folder structure. Can you help me.

    Limagito File Mover Subfolder Filename

    A: Yes this is possible using some Pascal Script. We’ll need two destinations.

    • The first destination must be our ‘Pascal Script’. This script will strip the immediate subfolder from the complete subfolder part.
    • The second destination will be a Windows folder (WIN). In this destination we’ll rename the file using the info from the first destination (pascal script).

    Limagito File Mover Destination Setup

    Let’s start with the first destination (Pascal Script):

    Var
      iList: Integer;
      tmpEntry: String;
      tmpList: TStringList;
    Begin
      psExitCode:= 1;
      // ... add your code here
      psVSA := Trim(psStringReplace(psFilePath, psSourcePath, ''));
      If psVSA <> '' Then
      Begin
        tmpList := TStringList.Create;
        Try
          tmpList.Delimiter := '\';
          tmpList.DelimitedText := psVSA;
          psVSA := '';
          // Iterate
          For iList := (tmpList.Count - 1) DownTo 0 Do
          Begin
            tmpEntry := Trim(tmpList.Strings[iList]);
            If tmpEntry <> '' Then
            Begin
              psVSA := tmpEntry;
              Break;
            End;
          End;
        Finally
          tmpList.Free;
        End;
      End;
      // Adjust
      If psVSA <> '' Then
        psVSA := psVSA + '_';
      // Debug
      psLogWrite(1, '', 'Stripped SubFolder: ' + psVSA);
    End.

    Limagito File Mover Pascal Script Setup

    Next we’ll setup our second destination (WIN):

    Limagito File Mover WIN as Destination

    Don’t forget to disable the ‘Create SubDir’ option if you don’t want to copy the source folder structure.

    Limgito File Mover Create Subfolder option

    File renaming setup:

    Limagito File Mover File Rename

    RegEx: (.*)

    Replacement: %VSA\1

    Limagito File Mover File Rename Setup

    RunTime Log:

    Limagito File Mover RunTime Log

    #FileTransfer

    If you need any info about this ‘Immediate folder name as filename’ question, please let us know.

    Best regards,

    Limagito Team

  • 19 Aug

    Change time date stamp to the time and date that files are moved

    Q: Is it possible, while moving a file, to also change the time date stamp to the time and date that the files are moved? I’m trying to set up a rule to remove certain files from a folder and just want to change the time and date of the file to the time that the file was moved by this rule.

    A: Yes this is possible. Please open your Destination setup and select ‘File & Directory’ Tab.

    Please enable our ‘Reset File DateTime to Current DateTime’ option.

    Limagito File Mover Timestamp

    Feedback user: “Works great. Thank you”

    #FileTransfer

    If you need any info about this ‘Change time date stamp’ request, please let us know.

    Best regards,

    Limagito Team

    By Limagito WIN , ,
  • 31 Jul

    Need support about moving files to sub folder ARCHIVE

    Q: Need support about moving files to sub folder ARCHIVE

    I would like to realize a move action with Limagito:

    > Source folder : D:\MECA + Subdir
    –Subdir contains \Customer_ONE, \Customer_TWO, etc.

    info : files to move are stored in each subfolder
    example:
    D:\MECA\Customer_ONE\po_20210720.csv
    D:\MECA\Customer_TWO\po_20210720.csv
    etc.

    > Function : Move

    > Destination folder :
    D:\MECA\Customer_ONE\Archive
    D:\MECA\Customer_TWO\Archive
    etc.

    You can see that Limagito will scan D:\MECA and its subfolders, and have to move files to archive subfolder.
    So objective is too collect the “Customer_ONE”, “Customer_TWO” value when Limagito scans…

    How can I set setting or make Pascal Script to be able to do this rule, and avoid create one rule per folder ?
    Let me know if my request is clear enough. Thanks in advance for your help.

    A: Could you please try the following. Some screenshots to get you started.

    • Source D:\MECA in our example is C:\Test\In_Meca\

    Limagito File Mover Mover to Archive

    • Windows Folder as Source:

    Limagito File Mover Mover to Archive

    • Directory Filter Setup:

    Limagito File Mover Mover to Archive

    • Directory Name Exclude Filter Setup (important)

    Limagito File Mover Mover to Archive

    • Destination Setup, Selected Directory is the same as the Source:

    Limagito File Mover Mover to Archive

    • Destination File & Directory ‘Create Subdir, option’ Setup

    Limagito File Mover Mover to Archive

    • RunTime Log:

    Limagito File Mover Mover to Archive

    If you need any help with this ‘moving files to sub folder ARCHIVE’ request, please let us know.

    #FileTransfer

    Best Regards,

    Limagito Team

    By Limagito WIN ,
1 2 3