title: Xamarin Forms : Move File from Share folder to Local Folder
body: <p>Hello i am trying to move file from the share to local :</p>
  <p>This is the method I am using to move file from the share to local folder :</p>
  <pre><code> try
              {
                  string version = &quot;0&quot;;
                  string user = &quot;*****&quot;;
                  string pass = &quot;*****&quot;;
  
                  string path = &quot;smb://172.20.121.36/MLS/hamzamls/Version.txt&quot;;
                  NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication(&quot;&quot;, user, pass);
                  SmbFile smbFile = new SmbFile(path, auth);
                  var file = new SmbFile(path, auth);
  
                  if (file.Exists())
                  {
                      SharpCifs.Config.SetProperty(&quot;jcifs.smb.client.lport&quot;, &quot;8080&quot;);
  
  
                      var readStream = file.GetInputStream();
                      var memStream = new MemoryStream();
                      ((Stream)readStream).CopyTo(memStream);
  
                      readStream.Dispose();
  
                      version = Encoding.UTF8.GetString(memStream.ToArray());
                      if (version != null &amp;&amp; AppInfo.VersionString.ToString() != version.ToString())
                      {
  
                          var documents = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
  
  
                          file.CopyTo(documents);
                      }
                  }
  
  
  
              }
              catch (Exception ex)
              {
  
                  throw;
              }
  </code></pre>
  <p>this code not work for me i get the error below.</p>
  <p><strong>cannot convert from 'string' to 'SharpCifs.Smb.SmbFile'</strong></p>
  <p><a href="https://i.stack.imgur.com/BKN6T.png" rel="nofollow noreferrer">Error Image</a></p>