Limagito Filemover Software Blog and News

  • 22 Aug

    File System Adapter Error Codes

    The File System Adapter performs actual file-related operations.

    Possible return values:

     Definition                      Value              Description
     ERROR_FACILITY_VFS              102400 (0x19000)   Base error code for VFS errors
     ERROR_VFS_ERROR_FLAG            1024 (0x0400)      VFS error flag
     ERROR_VFS_CUSTOM_ERROR_FLAG     2048 (0x0800)      VFS custom error flag
     SB_VFS_ERROR_FILE_NOT_FOUND     103426 (0x19402)   File not found
     SB_VFS_ERROR_PATH_NOT_FOUND     103427 (0x19403)   Path not found
     SB_VFS_ERROR_ACCESS_DENIED      103429 (0x19405)   Access denied
     SB_VFS_ERROR_WRITE_PROTECT      103443 (0x19413)   The file is write-protected
     SB_VFS_ERROR_ERROR_CRC          103447 (0x19417)   CRC error
     SB_VFS_ERROR_NOT_SUPPORTED      103474 (0x19432)   Operation not supported
     SB_VFS_ERROR_INVALID_PARAMETER  103511 (0x19457)   Invalid parameter encountered when accessing directory entries
     SB_VFS_ERROR_NO_MEDIA           104536 (0x19858)   Storage media is not accessible
     SB_VFS_UNSPECIFIED_ERROR        104448 (0x19800)   Any unspecified error
    By Limagito Error
  • 22 Aug

    Subdirectory Name Filter (Source = WIN)

    Let’s use an example to make things more clear.

    * Source Path: C:\Input\

    Folders available in Source Path:

    C:\Input\
    C:\Input\SubDir1
    C:\Input\SubDir2
    C:\Input\SubDir1\SubDir11
    C:\Input\SubDir2\Subdir21

    If we only want to include files from let’s say C:\Input\SubDir2 then we need to add the following filter to the ‘Include Subdirectory Name Filter’:

    SubDir2

    If we want to include files from C:\Input\SubDir2 and it’s subdirectories then we need to add the following filters to the ‘Include Subdirectory Name Filter’:

    SubDir2
    *\SubDir2\*

    By Limagito Parameters
  • 18 Jul

    LimagitoX Pascal Script Example

    We get a lot of custom requests. We can’t add them all to LimagitoX File Mover so that is why the Pascal Script option was added.  To understand the possibilities of Pascal Script we will add some cases to our blog. Please feel free to ask us about the Pascal Script possibilities.

    Customer Request:

    Secondly, the destination for the moving rule is in two seperate locations. Essentially, files from 1-5000 need to go to one location and files over 5001 need to go to another. Is this a job for pascal script? If so do you know of any good tutorials on how to write it? The files are named 1Filename, 2Filename … all the way to 5000Filename

    Our solution was the following:

    Add two destinations:
    – files from 1-5000 need to go to one location => FIRST DESTINATION
    – and files over 5001 need to go to another. => SECOND DESTINATION
    Add the following ‘On Destinations’ Pascal Script:
    var
      i: integer;
      tmpInt: Integer;
      tmpStr: String;
    Begin
      psExitCode:= 0;
      // … add your code here
      tmpInt := -1;
      // Get Number Prefix
      for i := 4 downto 1 do
      begin
        tmpStr := LeftStr(psFilename, i);
        try
          tmpInt := StrToInt(tmpStr);
        Except
          //
        End;
        If tmpInt <> -1 Then
          Break;
      end;
      // Check Number Prefix
      If tmpInt <> -1 Then
      Begin
        If (tmpInt <= 5000) And (psDestinationID = ‘ID1’) Then
          psExitCode := 1;
        If (tmpInt > 5000) And (psDestinationID = ‘ID2’) Then
          psExitCode := 1;
      End
      Else
        psLogWrite(2, ‘[Prefix Number Check]’, ‘Not a valid prefix, ‘ + psFilename);
    End.

     

1 21 22 23 24 25 26 27 29