Jump to content
Software FX Community

Could not find a part of the path :"\\windows\mscce35.dll" In desktop application


yamuna
 Share

Recommended Posts

Hi All,

 

As I am working on the desktop application.while copying one dll into another folder i am getting the exception like :

 "Could not find a part of the path :"\\windows\mscce35.dll" "

My code follows as:

string sFile = "CEPLAN.CPN";
  string sSourcePath = getAppPath() + @"ToCopy\DeviceRoot\" + sFile;
  string sTargetPath = @"\" + sFile;

  if (!File.Exists(sTargetPath)) // Check remote file does not exist
  {
  if (File.Exists(sSourcePath)) // Check local file exists before copy
  {
  File.Copy(sSourcePath, sTargetPath);
  }
  }

  // Copy to windows folder
  sSourcePath = getAppPath() + @"ToCopy\Windows";
  sTargetPath = @"\Windows";

  foreach (string sSourceFilePath in Directory.GetFiles(sSourcePath))
  {
  string sTargetFilePath = sTargetPath + @"\" + Path.GetFileName(sSourceFilePath);
  if (!File.Exists(sTargetFilePath)) // Check remote file does not exist
  {
  if (File.Exists(sSourceFilePath)) // Check local file exists before copy
  {
  File.Copy(sSourceFilePath, sTargetFilePath); //after coming to here i am getting the given exception
  }
  }
  }
 

 

Can any one help me,what i am missing or did any mistake ?

Reply me ASAP,if possible. 

Thanks in Advance. 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...