Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > TECHNICAL DISCUSSIONS > VB / ASP.NET Technologies
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

   

Reply
 
LinkBack Thread Tools Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Old 15-04-07, 06:58 AM   #1 (permalink)
Junior Member
 
Join Date: Jan 2007
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 2 arumahi is on a distinguished road
Path combining problem in c#

Hi All,
I am doing a task regarding Plug-In Installer, in my code I was trying to combine two part of the paths like the following codewhen I was debugging its saying that the part of the path could not find. I dont know whats the wrong but the path was correct. Could any one please tell me and any comments please welcome.

I defined a property which combines the paths. and Somewhere in the code I am using those properties , at that place while debugging error is coming with the message as said above.Here is my code:

// Propertiy combining the paths and errors also coming here (after @)
privatestring SharePointBinPath
{
get
{
string _commonProgramFiles = System.Environment.GetEnvironmentVariable("CommonProgramFiles");
return (Path.Combine(_commonProgramFiles, @"\Microsoft Shared\web server extensions\12\BIN\"));
}
}


// I am using the peroperties in this method
publicbool connectToRemote()
{
bool _success = true;
#region for moving the files to proper folders and running the .bat file

//HERE

File.Copy(Path.Combine(this.TempFolder2,this.installFile),this.SharePointBinPath,true);
File.Delete(Path.Combine(this.TempFolder2, this.installFile));
this.ExecutionMessages = "1. Moving LGinstall.bat file sucessful";
File.Copy(Path.Combine(this.TempFolder2, this.CabFile), this.SharePointBinPath, true);
File.Delete(Path.Combine(this.TempFolder2, this.CabFile));
this.ExecutionMessages = "2. Moving .CAB done successfully";
string path = Path.Combine(this.SharePointBinPath, this.installFile);


Waiting for anybodys reply

Best Regards,
Aruna
arumahi is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 21-08-08, 10:09 PM   #2 (permalink)
Junior Member
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1 Xander.Hurley is on a distinguished road
Re: Path combining problem in c#

Incorrect Results With Path.Combine - Hilton Giesenow's Jumbled Mind

basically remove the "\" from the 2nd path

Xander
Xander.Hurley is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
tips for interview ozobalu HR Questions 9 23-09-08 12:32 AM
must read all UG students!!!!!!!!!!!!! sanjay Other Queries 15 04-09-08 04:10 PM
creativity in problem solving pramodkumar.kak Group Discussion Topics 1 25-01-07 11:23 PM
Simple solution to a complex problem AjayKumar.Kataram Inspire yourself & Others - Leaders Zone 3 10-10-06 12:30 PM
System Problem au123 NETWORK ADMINISTRATION , HARDWARE & TROUBLESHOOTING 4 09-10-06 10:59 PM


All times are GMT +6.5. The time now is 09:25 AM.





Search Engine Optimization by vBSEO 3.1.0