Click here to Skip to main content
15,902,836 members
Home / Discussions / C#
   

C#

 
GeneralRe: Using File.Move() with variables Pin
Bekjong12-Feb-07 3:52
Bekjong12-Feb-07 3:52 
GeneralRe: Using File.Move() with variables Pin
markymark8212-Feb-07 4:06
markymark8212-Feb-07 4:06 
AnswerRe: Using File.Move() with variables Pin
althamda12-Feb-07 4:04
althamda12-Feb-07 4:04 
GeneralRe: Using File.Move() with variables Pin
__DanC__12-Feb-07 4:07
__DanC__12-Feb-07 4:07 
GeneralRe: Using File.Move() with variables Pin
markymark8212-Feb-07 4:07
markymark8212-Feb-07 4:07 
AnswerRe: Using File.Move() with variables Pin
lost in transition 12-Feb-07 4:13
lost in transition 12-Feb-07 4:13 
GeneralRe: Using File.Move() with variables Pin
__DanC__12-Feb-07 4:21
__DanC__12-Feb-07 4:21 
GeneralRe: Using File.Move() with variables Pin
markymark8212-Feb-07 4:24
markymark8212-Feb-07 4:24 
ok, as suggested i removed 'ToString()' - that was mainly added due to frustration.

String ParentDir = textfield1.Text;
String ChildDir = textfield2.Text;
DirectoryInfo di = new DirectoryInfo(@"c:\"+ParentDir+@"\"+ChildDir+@"\");

foreach (FileInfo fileinfo in di.GetFiles())
{
String newdirectory = @"c:\"+ParentDir+@"\";
//new file name is same as one found
String newfilename = fileinfo.Name.ToString();
//String Newdirandname = newdirectory + newfilename;

//File.Move(di+fileinfo.Name, Newdirandname);

fileinfo.MoveTo(Path.Combine(newdirectory, newfilename));
//I have changed this to be fileinfo.MoveTo() to avoid passing the wrong parameter but I still get the same message. I also tried the Path.Combine() method but it didn't change anything

I think I have tried testing everything now and it all comes back to the same result.

}
GeneralRe: Using File.Move() with variables Pin
markymark8212-Feb-07 4:43
markymark8212-Feb-07 4:43 
AnswerRe: Using File.Move() with variables Pin
Pete O'Hanlon12-Feb-07 4:44
mvePete O'Hanlon12-Feb-07 4:44 
QuestionOverriding Form.Dispose(bool disposing)... Pin
Shy Agam12-Feb-07 3:28
Shy Agam12-Feb-07 3:28 
AnswerRe: Overriding Form.Dispose(bool disposing)... Pin
Bekjong12-Feb-07 3:39
Bekjong12-Feb-07 3:39 
QuestionError while saving images through GDI+ Pin
Nitin198112-Feb-07 3:28
Nitin198112-Feb-07 3:28 
AnswerRe: Error while saving images through GDI+ Pin
Luc Pattyn12-Feb-07 6:07
sitebuilderLuc Pattyn12-Feb-07 6:07 
GeneralRe: Error while saving images through GDI+ Pin
Nitin198113-Feb-07 7:50
Nitin198113-Feb-07 7:50 
QuestionPlease on help on clearing cache in webbrowser control Pin
engsrini12-Feb-07 3:21
engsrini12-Feb-07 3:21 
QuestionSetup And Deployment - Shortcuts icon... Pin
Shy Agam12-Feb-07 2:22
Shy Agam12-Feb-07 2:22 
AnswerRe: Setup And Deployment - Shortcuts icon... Pin
Mircea Puiu12-Feb-07 2:51
Mircea Puiu12-Feb-07 2:51 
QuestionHtmlReport for C#.net Pin
jaganil12-Feb-07 2:21
jaganil12-Feb-07 2:21 
AnswerRe: HtmlReport for C#.net Pin
Saira Tanwir12-Feb-07 4:23
Saira Tanwir12-Feb-07 4:23 
GeneralRe: HtmlReport for C#.net Pin
jaganil12-Feb-07 18:47
jaganil12-Feb-07 18:47 
GeneralRe: HtmlReport for C#.net Pin
jaganil12-Feb-07 18:48
jaganil12-Feb-07 18:48 
QuestionEdit Menu option Pin
sjs4u12-Feb-07 2:10
sjs4u12-Feb-07 2:10 
AnswerRe: Edit Menu option Pin
Mircea Puiu12-Feb-07 3:02
Mircea Puiu12-Feb-07 3:02 
QuestionCode about Zoom on Map Pin
sahelearamesh12-Feb-07 1:36
sahelearamesh12-Feb-07 1:36 

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.