Click here to Skip to main content
15,895,740 members
Home / Discussions / C#
   

C#

 
GeneralRe: Plz do help me..................... Pin
Guffa16-Sep-07 21:00
Guffa16-Sep-07 21:00 
GeneralRe: Plz do help me..................... Pin
Vasudevan Deepak Kumar16-Sep-07 21:14
Vasudevan Deepak Kumar16-Sep-07 21:14 
QuestionHow to make the DLL secure...? Pin
Pankaj - Joshi16-Sep-07 18:55
Pankaj - Joshi16-Sep-07 18:55 
AnswerRe: How to make the DLL secure...? [modified] Pin
ring_016-Sep-07 19:06
ring_016-Sep-07 19:06 
GeneralRe: How to make the DLL secure...? Pin
Pankaj - Joshi16-Sep-07 19:13
Pankaj - Joshi16-Sep-07 19:13 
GeneralRe: How to make the DLL secure...? Pin
ring_016-Sep-07 19:19
ring_016-Sep-07 19:19 
GeneralRe: How to make the DLL secure...? Pin
Pankaj - Joshi16-Sep-07 19:30
Pankaj - Joshi16-Sep-07 19:30 
QuestionPlz help me to copy a file from server to hard disc [modified] Pin
P_Elza16-Sep-07 18:45
P_Elza16-Sep-07 18:45 
I want to search a file from server and want to copy it to the local disk.
how it is done? This is working if the file is in my hard disk itself.But not when it comes to server. If i map the server i can search.like y:\\serverfolde\\folder am tring to make an exe. different people will map to different drive. so i cant give like that.should give like @\\server\\serverfolde\\folder\\ but it is not working.
My code is
<br />
searchfolder="y:\\Template\\else";<br />
				destination ="D:\\Princy\\My Documents\\project\\";<br />
				string source=searchfolder+"\\"+"mod501_"+filetosearch+".3d";<br />
				string target=destination+"mod501-"+filetosearch+".3d";<br />
				string[] files = Directory.GetFiles(searchfolder, "mod501_"+filetosearch+".3d");<br />
				//string[] files = Directory.GetFiles(searchfolder, filetosearch+"*");<br />
				if(files.Length==1)<br />
				{<br />
					foreach (string dir in files) <br />
					{<br />
						lblcnt.Text="Selected File: "+ dir;<br />
						string[] search = Directory.GetFiles(destination,"mod501-"+filetosearch+".3d");<br />
						if(search.Length>0)<br />
						{<br />
							lblcnt.Visible=true;<br />
							lblcnt.Text="File already exist";<br />
						}<br />
						else<br />
						{<br />
							File.Copy(source,target);<br />
							lblcnt.Visible=true;<br />
							lblcnt.Text="File copied";<br />
						}<br />
					}<br />

what to give insted of
searchfolder="y:\\Template\\else";

If am using
searchfolder="@books\\template\\Template\\else";
am geting error:
System.IO.DirectoryNotFoundException:Could not find a part of the "@books\template\Template\els".
Otherwise its working perfectly.


-- modified at 4:45 Monday 17th September, 2007
AnswerRe: Plz help me to copy a file from server to hard disc Pin
ChrisKo17-Sep-07 10:30
ChrisKo17-Sep-07 10:30 
QuestionWeb Services: How to change http header of the request Pin
mishakogan16-Sep-07 18:36
mishakogan16-Sep-07 18:36 
QuestionHow to call a Function in VC++ from C#? Pin
ss43116-Sep-07 18:26
ss43116-Sep-07 18:26 
AnswerRe: How to call a Function in VC++ from C#? Pin
Niiiissssshhhhhuuuuu16-Sep-07 21:20
Niiiissssshhhhhuuuuu16-Sep-07 21:20 
AnswerRe: How to call a Function in VC++ from C#? Pin
N a v a n e e t h16-Sep-07 23:15
N a v a n e e t h16-Sep-07 23:15 
QuestionHow to Generate events from strings Pin
Amar Chaudhary16-Sep-07 18:17
Amar Chaudhary16-Sep-07 18:17 
AnswerRe: How to Generate events from strings Pin
Urs Enzler16-Sep-07 20:54
Urs Enzler16-Sep-07 20:54 
AnswerRe: How to Generate events from strings Pin
RaviBattula17-Sep-07 0:03
professionalRaviBattula17-Sep-07 0:03 
QuestionHelp reading data Pin
falles0116-Sep-07 16:56
falles0116-Sep-07 16:56 
AnswerRe: Help reading data Pin
Paul Conrad16-Sep-07 17:18
professionalPaul Conrad16-Sep-07 17:18 
GeneralRe: Help reading data Pin
falles0116-Sep-07 17:21
falles0116-Sep-07 17:21 
GeneralRe: Help reading data Pin
Paul Conrad16-Sep-07 17:27
professionalPaul Conrad16-Sep-07 17:27 
QuestionReading Big Endian Values Pin
Klazen16-Sep-07 16:39
Klazen16-Sep-07 16:39 
AnswerRe: Reading Big Endian Values Pin
Paul Conrad16-Sep-07 17:19
professionalPaul Conrad16-Sep-07 17:19 
GeneralRe: Reading Big Endian Values Pin
Klazen17-Sep-07 9:02
Klazen17-Sep-07 9:02 
Questionrelating between a winform and a web form Pin
H.R16-Sep-07 12:40
H.R16-Sep-07 12:40 
AnswerRe: relating between a winform and a web form Pin
Christian Graus16-Sep-07 12:48
protectorChristian Graus16-Sep-07 12:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.