Click here to Skip to main content
15,910,603 members
Home / Discussions / C#
   

C#

 
AnswerRe: Moving a file from a CD to a Folder somewhere on hardrive Pin
Keith Barrow10-Feb-10 9:15
professionalKeith Barrow10-Feb-10 9:15 
GeneralRe: Moving a file from a CD to a Folder somewhere on hardrive Pin
shadowthief_0310-Feb-10 9:53
shadowthief_0310-Feb-10 9:53 
GeneralRe: Moving a file from a CD to a Folder somewhere on hardrive Pin
Keith Barrow10-Feb-10 10:08
professionalKeith Barrow10-Feb-10 10:08 
GeneralRe: Moving a file from a CD to a Folder somewhere on hardrive Pin
shadowthief_0310-Feb-10 10:35
shadowthief_0310-Feb-10 10:35 
GeneralRe: Moving a file from a CD to a Folder somewhere on hardrive Pin
Keith Barrow10-Feb-10 11:21
professionalKeith Barrow10-Feb-10 11:21 
GeneralRe: Moving a file from a CD to a Folder somewhere on hardrive Pin
shadowthief_0310-Feb-10 10:53
shadowthief_0310-Feb-10 10:53 
GeneralRe: Moving a file from a CD to a Folder somewhere on hardrive Pin
Eddy Vluggen10-Feb-10 11:14
professionalEddy Vluggen10-Feb-10 11:14 
GeneralRe: Moving a file from a CD to a Folder somewhere on hardrive Pin
shadowthief_0310-Feb-10 11:24
shadowthief_0310-Feb-10 11:24 
here is my code i used to copy the file, i get the same error any idea why ??

private void MoveFile()
{
    System.IO.File.Copy(sourceFile, destFile, true);

    // To copy all the files in one directory to another directory.
    // Get the files in the source folder. (To recursively iterate through
    // all subfolders under the current directory, see
    // "How to: Iterate Through a Directory Tree.")
    // Note: Check for target path was performed previously
    //       in this code example.
    if (System.IO.Directory.Exists(sourcePath))
    {
        string[] files = System.IO.Directory.GetFiles(sourcePath);

        // Copy the files and overwrite destination files if they already exist.
        foreach (string s in files)
        {
            // Use static Path methods to extract only the file name from the path.
            fileName = System.IO.Path.GetFileName(s);
            destFile = System.IO.Path.Combine(targetPath, fileName);
            System.IO.File.Copy(s, destFile, true);
        }
    }
    else
    {
        Console.WriteLine("Source path does not exist!");
    }

}

GeneralRe: Moving a file from a CD to a Folder somewhere on hardrive Pin
Keith Barrow10-Feb-10 11:38
professionalKeith Barrow10-Feb-10 11:38 
GeneralRe: Moving a file from a CD to a Folder somewhere on hardrive Pin
shadowthief_0310-Feb-10 11:56
shadowthief_0310-Feb-10 11:56 
GeneralRe: Moving a file from a CD to a Folder somewhere on hardrive Pin
Eddy Vluggen10-Feb-10 12:00
professionalEddy Vluggen10-Feb-10 12:00 
QuestionHow to Load & Save to val's in app.config file ? Pin
Gali197810-Feb-10 7:59
Gali197810-Feb-10 7:59 
AnswerRe: How to Load & Save to val's in app.config file ? Pin
Dan Mos10-Feb-10 8:27
Dan Mos10-Feb-10 8:27 
QuestionUserControl Designer Support Pin
Andy Braham10-Feb-10 7:32
Andy Braham10-Feb-10 7:32 
Questionwant code Pin
ajay 201010-Feb-10 7:08
ajay 201010-Feb-10 7:08 
AnswerMessage Closed Pin
10-Feb-10 7:31
stancrm10-Feb-10 7:31 
GeneralRe: want code Pin
ajay 201011-Feb-10 1:09
ajay 201011-Feb-10 1:09 
AnswerRe: want code Pin
Dan Mos10-Feb-10 7:31
Dan Mos10-Feb-10 7:31 
GeneralRe: want code Pin
ajay 201011-Feb-10 1:16
ajay 201011-Feb-10 1:16 
GeneralRe: want code Pin
ajay 201011-Feb-10 1:20
ajay 201011-Feb-10 1:20 
GeneralRe: want code Pin
ajay 201011-Feb-10 1:21
ajay 201011-Feb-10 1:21 
RantRe: want code Pin
Bram van Kampen10-Feb-10 15:47
Bram van Kampen10-Feb-10 15:47 
AnswerWant Ferrari Pin
J4amieC10-Feb-10 21:53
J4amieC10-Feb-10 21:53 
QuestionUpdate a Desktop Application by Dowloading a File Pin
PDTUM10-Feb-10 6:58
PDTUM10-Feb-10 6:58 
AnswerRe: Update a Desktop Application by Dowloading a File Pin
Giorgi Dalakishvili10-Feb-10 7:11
mentorGiorgi Dalakishvili10-Feb-10 7:11 

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.