ADF Copy Issue - Long File Path names

Krishna Nagesh Kukkadapu 21 Reputation points
2020-07-27T15:06:24.047+00:00

Hello, I am using copy activity to copy the files from on premise to Azure Storage Account . The job is failing as there is a long file path name at the source.
can someone help me how can i fix this issue
I am getting the following error
"message": "ErrorCode=UserErrorFileNotFound,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot find the file specified. Folder path: '<<long file path>>''.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.IO.FileNotFoundException,Message=Could not find file '<<long file path>>'",
"failureType": "UserError",
"target": "CopyToBlob",
"details": []

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,805 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,502 Reputation points Microsoft Employee
    2020-07-28T23:32:08.353+00:00

    Hi @Krishna Nagesh Kukkadapu ,

    Thanks for reaching out. This looks like a limitation on the file path maximum length which is already documented in below documentation :

    https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation

    Could you please follow these steps to enable long path in you SHIR hosted VM and see if that helps to resolve the issue (This workaround is suggested for the OS of the VM where SHIR installed is at-least Windows Server 2016, Windows 10):

    1. Logon to SHIR hosted VM.
    2. Open "Local Group Policy Editor", in the left-handed pane, drill down to computer configuration > Administrative Templates > system > Filesystem.
      On the right, find the "Enable win32 long paths" item and double-check it.
    3. In the properties window that opens, select the "Enabled" option and then click "OK". 14107-image.png
    4. You can now exit the Local Group Policy Editor and restart your computer (or sign out and back in) to allow the changes to finish.

    Let us know how it goes.

    ----------

    Thank you
    Please do consider to click on "Accept Answer" and "Upvote" on the post that helps you, as it can be beneficial to other community members.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.