Click here to Skip to main content
15,900,589 members
Home / Discussions / C#
   

C#

 
AnswerRe: Connect C# win app and ASP.Net/C# website using HttpRequests? [modified] Pin
Vimalsoft(Pty) Ltd30-Jun-09 2:15
professionalVimalsoft(Pty) Ltd30-Jun-09 2:15 
GeneralRe: Connect C# win app and ASP.Net/C# website using HttpRequests? Pin
Mtyb30-Jun-09 2:47
Mtyb30-Jun-09 2:47 
GeneralRe: Connect C# win app and ASP.Net/C# website using HttpRequests? Pin
Vimalsoft(Pty) Ltd30-Jun-09 2:52
professionalVimalsoft(Pty) Ltd30-Jun-09 2:52 
GeneralRe: Connect C# win app and ASP.Net/C# website using HttpRequests? Pin
Mtyb30-Jun-09 2:59
Mtyb30-Jun-09 2:59 
GeneralRe: Connect C# win app and ASP.Net/C# website using HttpRequests? Pin
Vimalsoft(Pty) Ltd30-Jun-09 3:12
professionalVimalsoft(Pty) Ltd30-Jun-09 3:12 
GeneralRe: Connect C# win app and ASP.Net/C# website using HttpRequests? Pin
Mtyb30-Jun-09 3:32
Mtyb30-Jun-09 3:32 
GeneralRe: Connect C# win app and ASP.Net/C# website using HttpRequests? Pin
Vimalsoft(Pty) Ltd30-Jun-09 3:35
professionalVimalsoft(Pty) Ltd30-Jun-09 3:35 
QuestionHow to Add file to the folder only if the file doesnt exist Pin
Krishna Aditya30-Jun-09 1:09
Krishna Aditya30-Jun-09 1:09 
Hi,

I have   a template file in a folder " c:\template_folder".

At runtime, I will create a new folder " c:\new_folder" and wish to copy the template file to the new_folder only if the file doesnt exist.

description:
for the first time, I will copy the template file to the new_folder and rename it with username... so that after first time the loop finishes,   i   will have 8 excel files with username as the name of the each file.

for the second loop, if I have to copy the template file to new_folder and rename it to the username, if the file with the user name already exists, then it shouldnt copy the file to the folder.

I am addin the snippet of the code for reference.

                                          foreach (FileInfo fi in templateFile)
                                          {
                                                string oldfilename = null;
                                                string newfilename = null;
                                                if (dir.Exists)
                                                {
                                                     
                                                      fi.CopyTo(Path.Combine(dir.ToString(), fi.Name));
                                                      FileInfo fileName = new FileInfo(fi.Name);
                                                      oldfilename = Path.Combine(dir.ToString(), fileName.ToString());
                                                      newfilename = Path.Combine(dir.ToString(), tempUserName + " "   + "E" + tempUserID + " VIPv7.0.xls");


                                                      //if( !dir.ToString().Contains(newfilename))
                                                      foreach( FileInfo fileList in fileNames)
                                                      {
                                                            if (fileList.Exists == false)
                                                                  File.Move(oldfilename, newfilename);
                                                      }
                                                }
                                          }

please help me in working this.

thanks
ramm
AnswerRe: How to Add file to the folder only if the file doesnt exist Pin
musefan30-Jun-09 2:23
musefan30-Jun-09 2:23 
GeneralADO.NET.... Pin
Isaac Gordon30-Jun-09 0:29
Isaac Gordon30-Jun-09 0:29 
GeneralRe: ADO.NET.... Pin
Pete O'Hanlon30-Jun-09 0:41
mvePete O'Hanlon30-Jun-09 0:41 
GeneralRe: ADO.NET.... Pin
Manas Bhardwaj30-Jun-09 0:44
professionalManas Bhardwaj30-Jun-09 0:44 
GeneralRe: ADO.NET.... Pin
Svetlin Panayotov30-Jun-09 0:50
Svetlin Panayotov30-Jun-09 0:50 
GeneralRe: ADO.NET.... Pin
Vimalsoft(Pty) Ltd30-Jun-09 1:41
professionalVimalsoft(Pty) Ltd30-Jun-09 1:41 
GeneralRe: ADO.NET.... Pin
dan!sh 30-Jun-09 1:51
professional dan!sh 30-Jun-09 1:51 
GeneralRe: ADO.NET.... Pin
PIEBALDconsult30-Jun-09 19:02
mvePIEBALDconsult30-Jun-09 19:02 
QuestionHow to change Web Service url dynamically when it's referenced in a class library (dll) ? Pin
shaul-y29-Jun-09 23:56
shaul-y29-Jun-09 23:56 
AnswerRe: How to change Web Service url dynamically when it's referenced in a class library (dll) ? Pin
Pete O'Hanlon30-Jun-09 0:35
mvePete O'Hanlon30-Jun-09 0:35 
GeneralThanks but this solution is not relevant for my scenario... Pin
shaul-y30-Jun-09 1:12
shaul-y30-Jun-09 1:12 
GeneralRe: Thanks but this solution is not relevant for my scenario... Pin
Pete O'Hanlon30-Jun-09 1:17
mvePete O'Hanlon30-Jun-09 1:17 
GeneralRe: Thanks but this solution is not relevant for my scenario... Pin
shaul-y30-Jun-09 3:08
shaul-y30-Jun-09 3:08 
Questionis there anyway to know default icon or user specified icon showing in the form currently Pin
mutpan29-Jun-09 23:42
mutpan29-Jun-09 23:42 
AnswerRe: is there anyway to know default icon or user specified icon showing in the form currently Pin
stancrm29-Jun-09 23:56
stancrm29-Jun-09 23:56 
GeneralRe: is there anyway to know default icon or user specified icon showing in the form currently Pin
mutpan30-Jun-09 1:35
mutpan30-Jun-09 1:35 
Questioncontrol winforms application from remote computer Pin
Jan198229-Jun-09 23:38
Jan198229-Jun-09 23:38 

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.