title: Unable to copy file from SFTP in Azure Data Factory when using wildcard(*) in the filename
body: <p>I am unable to copy csv files from an SFTP connection to blob storage when using the wildcard(*) in the filename.</p>
  
  <p>More specifically, I receive csv files in the SFTP on a daily basis, and they are of the format: "ddMMyyyyxxxxxx.csv", where "xxxxxx" is the timestamp. More concretely, my csv file for the 13th of March is: "13032019083647.csv", while for the 14th of March: "14032019083556.csv". Obviously, the timestamp is different for every day, thus I want to copy the file independently of whatever strings exists between the date and the the file extenstion.</p>
  
  <p>In the "File" subfield of the "File path" of the "Connection" tab of my subset, I give as input: "13032019*.csv", as instructed by the help icon next to the field:</p>
  
  <p><a href="https://i.stack.imgur.com/2DKRM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2DKRM.png" alt="File name or file filter"></a></p>
  
  <p>When I do so, my Debug run fails with: </p>
  
  <blockquote>
    <p>{"errorCode": "2200", "message":
    "ErrorCode=UserErrorInvalidCopyBehaviorBlobNameNotAllowedWithPreserveOrFlattenHierarchy,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot
    adopt copy behavior PreserveHierarchy when copying from folder to a
    single file.,Source=Microsoft.DataTransfer.ClientLibrary}</p>
  </blockquote>
  
  <p>I receive a similar error no matter which type of copy behaviour I choose. I have also tried experimenting with the fileFilter parameter (even though ADF warns that the same behaviour can be achieved with the fileName option), but I still end up getting the same error.</p>
  
  <p>For further clarification, I am attaching the Code segment that ADF produces for this configuration:</p>
  
  <p><a href="https://i.stack.imgur.com/2ZxzF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2ZxzF.png" alt="Code segment with failing fileName"></a></p>
  
  <p>I should also mention, that when using the full fileName in the corresponding field, namely the value: "13032019083647.csv", copying works normally.</p>
  
  <p>Any help would be greatly appreciated!</p>