title: Why is file's local directory being created to remote on upload
body: <p>I am creating a .NET service application that will provide FTPS functionality.</p>
  
  <p>When uploading a local file to the remote location, the local file's immediate directory is recreated in the remote location.</p>
  
  <p>I suspect the mask I am using is part of my problem, but I'm not sure. What is causing the directory to be recreated in the remote location?</p>
  
  <p>I have tried altering the mask based on the <a href="https://winscp.net/eng/docs/file_mask" rel="nofollow noreferrer">documentation</a>.</p>
  
  <pre><code>public static void Upload()
  {
      using (Session session = new Session())
      {
          /* Connect
           * */
          session.Open(GetSessionOptions());
  
          /* Upload files
           * */
          string localFilePath = "C:\\WinScpTest\\test\\";
          string remoteFilePath = $"/Remote/{DateTime.Now.Year.ToString()}/";
          bool removeOrig = false;
          TransferOptions transferOpts = new TransferOptions
          {
              TransferMode = TransferMode.Binary,
              FileMask = "*.txt"
          };
          TransferOperationResult result = session.PutFiles(localFilePath, remoteFilePath, removeOrig, transferOpts);
  
      }
  }
  </code></pre>
  
  <p>I would expect a local file <code>C:\WinScpTest\test\file.txt</code> to upload to <code>/Remote/2019/file.txt</code>. Instead, I see this <code>/Remote/2019/test/file.txt</code></p>