This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Skip External File on Error & Move Folders

We have an issue that has plagued our system for a while - and is getting worse the more we import into M-Files.

Due to the file length restrictions, M-Files truncates the file name to import this into M-FIles. This is very annoying, especially when we have very long folders. As a result we often have errors like this:

Processing the contents of the external source "2015 (\rhm-srv01\data\B_corres\Job Numbers\2015)" failed.
Processing of the source file "\rhm-srv01\data\B_corres\Job Numbers\2015\15-2536\WIP\Variations\Vary 7 - Additional 100 bricks replaced on roof\Variation 9 .pdf" failed.
Updating the external link of the file "Variation 9.pdf" failed.
Adding the linked file failed.
File "\rhm-srv01\data\B_corres\Job Numbers\2015\15-2536\WIP\Variations\Vary 7 - Additional 100 bricks replaced on roof\Variation 9.pdf" already exists.

Once this error is reached, the import/link of the external files stops.

How I have implemented the import/link process is giving the files a workflow which adds the necessary metadata to the file based on its location, classification folder and names. This also links it with the required object (a job number) . Within the script, is it possible to have it set so that if this error is reached, it skips importing this file and prints the file to a text document on the server. That way I can easily find the file that's causing the havoc and make the neccessary changes at my leaisure without having the import process stopping.

I know, at one point, there was something in the works to allow for longer paths (we have a windows SBS 2011 at the M-Files host). I don't know if any progress on this has been made.


----

On a slightly different note, to reduce the file path, I will be creating a network drive linked to the filder. So instead of \rhm-srv01\data\B_corres\Job Numbers\2015 it'll simply be J:\2015 (reducing about 35 characters). How do I go about moving the entire folders linked to M-Files without messing anything up?

Or could I simply:

[list type=decimal]
  • Stop M-Files server and disable external sources

  • Move the folder to the new location

  • change the locations of the external sources in the admin panel to match the new locations

  • Enable the external sources and start server

[/list]

Would this allow M-Files to simply pick-up where it left off, treating the new folders as where they were originally?
  • Hi All, just following up the first part of this (I have already solved the second part), is there any way to skip a file during the import external folders process?


    M-Files 2018
    RHM M-Files {942A13F6-C0C0-442A-BE96-973392070862}

    Processing the contents of the external source "2009 (\rhm-srv01\Jobs\2009)" failed.
    Processing of the source file "\rhm-srv01\##\2009\###\Communications\Outgoing\###\1##3 .msg" failed.
    Updating the external link of the file "1####" failed.
    Adding the linked file failed.
    File "\rhm-srv01\###\2009\###\Communications\Outgoing\#####\####.msg" already exists.


    We keep getting errors like this because files are either too long, or people add spcaes at the end of names that arent recognized by M-Files.

    I just need something that skips errors and if possible prints out the error so that I can find it.

    Thanks!
  • There will be an improvement in the June '19 Update so that importing should continue after errors, I don't have the exact details on this though so I suggest that you update the server next month and see if this improvement would help in your case.
  • Excellent thanks Joonas, I'll keep an eye out!
  • It seems this improvement was already included in the May update which is rolling out now. From the release notes:

    Improvement: Improvements to external file source importing
    ID: 9826
    Description: When importing objects from an external file source, the entire operation fails if there is just one source file or email that cannot be imported. Erroneous files and emails are now skipped, allowing the operation to continue. A generic warning about any errors during the operation is reported to the Windows event log.
  • Great news! Joonas, could you dig up details on the error message that will be recorded in the event log, please? We will have to set up some kind of alarm system to notify admins of files that were skipped. It would help to know exactly what to look for.
    Karl
  • Sorry to dig up an old thread, I've had a million other things taking up my time and haven't had time to work on M-Files.

    The server has been upgraded to the last version (19.9.8227.13).

    This has been kept upgraded for some time (i.e. auto upgrade for each version).

    IT still seems to stop the upgrading process when critical errors are reached. IT's same exact same error as the post above. Does this require a registry edit?
  • I'm not aware that this would need a registry edit, but there may be a difference if you are importing the files (moving them from disk to M-Files) or linking the files (keeping them on disk). You could check these details from our technical support.

    Note that if the goal is to keep the files in their original location on the disk, you may have better results using the Network Folder Connector which is more robust and configurable than the legacy linking functionality.