AZCopy doesnot copy files and folders with special charcters RRS feed

  • Question

  • I have a blob storage with large number of files and folders. I am using AZCopy to copy the data from Blob storage to File storage.

    But the verbose log from AZCopy returned errors for few files and folders

    1. The transfer failed: The remote server returned an error: (400) Bad Request.

    2. Failed to validate destination: The remote server returned an error: (400) Bad Request.

    When i checked the files/folders it had special characters:

    • 
    • i￳

    AZCopy Command:

    /source:<sourceUrl> /Dest:<Destpath> /Sourcekey:{AccessKey} /DestKey:{AccessKey} " +
     $"/S /V:<logfilepath> AzCopyVerboselog.log /Z:<journallogpath>

    How can i copy these files using AZCopy? Any parameters do i need to pass or any change in command required?

    Please help.

    Wednesday, July 12, 2017 12:02 PM

All replies

  • When you copy a file from blob to file share, a server-side copy operation is performed. This error may occur either the source or destination is unreachable. when the Blob service receives a Copy Blob request, it will first ensure that the source exists, and it can be accessed. If source does not exist or cannot be accessed, an HTTP status code 400 (Bad Request) is returned. 

    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.

    • Edited by vikranth s Wednesday, July 12, 2017 8:06 PM
    • Proposed as answer by vikranth s Thursday, July 13, 2017 12:24 PM
    Wednesday, July 12, 2017 8:06 PM
  • When i access the file from Azure portal it is accessible. But via azcopy it throws throws the error.

    I have tried the copy twice. The errors appeared for the same files.

    Is it due the special characters present in the folder or file name? 

    If no, what will be the solution to this?

    Monday, July 17, 2017 6:33 AM
  • What version of AzCopy are you using? You may download the latest version of AzCopy on Windows and then check if it helps.

    I was able to copy a special character file to the File Share in my lab. You may try copying a single file (the problematic special character file) and see if it makes any difference. 
    Also, could you provide the sample cmdlet that you are using? and copy a screenshot of the error message here after concealing any private information.

    You may collect a network trace as mentioned in the documentation here and see if it points out any specific issue.

    For additional details: By default, AzCopy uses / as the delimiter character. However, AzCopy supports using any common character (such as @, #, or %) as a delimiter. If you need to include one of these special characters on the command line, enclose the file name with double quotes. Refer Transfer data with the AzCopy on Windows for more details.


    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.

    Monday, July 17, 2017 5:07 PM