Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how can i copy a file to somewhere in my hard disk?

how can i copy a file to somewhere in my hard disk?

Scheduled Pinned Locked Moved C#
questioncsharp
18 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M maifs

    i want to copy a file from a location to some specific location in c#?

    S Offline
    S Offline
    Simon P Stevens
    wrote on last edited by
    #2

    Have you tried

    System.IO.File.Copy("Source", "Destination");

    Docs on MSDN[^]

    Simon

    G M 2 Replies Last reply
    0
    • M maifs

      i want to copy a file from a location to some specific location in c#?

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #3

      You need to copy a file so why don't you Google or search msdn? Is it so difficult?

      Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

      M 1 Reply Last reply
      0
      • S Simon P Stevens

        Have you tried

        System.IO.File.Copy("Source", "Destination");

        Docs on MSDN[^]

        Simon

        G Offline
        G Offline
        Giorgi Dalakishvili
        wrote on last edited by
        #4

        Simon Stevens wrote:

        System.IO.File.Copy("Source", "Destination");

        Hey I tried it but I got FileNotFoundException. Can u plz e-mail me full project at troll@hotmail.com ? It's very urgntz. Thanks

        Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

        S 1 Reply Last reply
        0
        • M maifs

          i want to copy a file from a location to some specific location in c#?

          A Offline
          A Offline
          Ashfield
          wrote on last edited by
          #5

          And there is a point to this post? Have you tried MSDN, Google, or even (heaven forbid) press F1 while in the ide? I think you are in the wrong job if you are unable to do something this simple without posting to a forum.

          Bob Ashfield Consultants Ltd

          1 Reply Last reply
          0
          • S Simon P Stevens

            Have you tried

            System.IO.File.Copy("Source", "Destination");

            Docs on MSDN[^]

            Simon

            M Offline
            M Offline
            maifs
            wrote on last edited by
            #6

            thx budy, its working

            Maifs

            1 Reply Last reply
            0
            • G Giorgi Dalakishvili

              You need to copy a file so why don't you Google or search msdn? Is it so difficult?

              Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

              M Offline
              M Offline
              maifs
              wrote on last edited by
              #7

              no, i didnt find it, thx

              Maifs

              G 1 Reply Last reply
              0
              • M maifs

                no, i didnt find it, thx

                Maifs

                G Offline
                G Offline
                Giorgi Dalakishvili
                wrote on last edited by
                #8

                In that case I recommend you read this: How to use google and other tips for finding programming help[^]

                Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

                M 1 Reply Last reply
                0
                • G Giorgi Dalakishvili

                  Simon Stevens wrote:

                  System.IO.File.Copy("Source", "Destination");

                  Hey I tried it but I got FileNotFoundException. Can u plz e-mail me full project at troll@hotmail.com ? It's very urgntz. Thanks

                  Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

                  S Offline
                  S Offline
                  Simon P Stevens
                  wrote on last edited by
                  #9

                  :laugh: :laugh: :laugh: I got an email notification and didn't notice the user name. I was all geared up to come back with a really cutting sarcastic comment. Then I noticed it was you. I have pent up sarcasm now that I need to release. God help the next person who posts a programming question in the lounge. (Or the next person in the office who asks how to add numbers together in excel) ;)

                  Simon

                  G 2 Replies Last reply
                  0
                  • G Giorgi Dalakishvili

                    In that case I recommend you read this: How to use google and other tips for finding programming help[^]

                    Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

                    M Offline
                    M Offline
                    maifs
                    wrote on last edited by
                    #10

                    thx dear

                    Maifs

                    1 Reply Last reply
                    0
                    • S Simon P Stevens

                      :laugh: :laugh: :laugh: I got an email notification and didn't notice the user name. I was all geared up to come back with a really cutting sarcastic comment. Then I noticed it was you. I have pent up sarcasm now that I need to release. God help the next person who posts a programming question in the lounge. (Or the next person in the office who asks how to add numbers together in excel) ;)

                      Simon

                      G Offline
                      G Offline
                      Giorgi Dalakishvili
                      wrote on last edited by
                      #11

                      You should have guessed that it's not he because I said 'Thanks' while he uses[^] 'thx' :-D

                      Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

                      G 1 Reply Last reply
                      0
                      • M maifs

                        i want to copy a file from a location to some specific location in c#?

                        C Offline
                        C Offline
                        Chandrashekar Reddy 0
                        wrote on last edited by
                        #12

                        I am facing simlar problem here. If you get it, plz send me also. my email is chandu_reddy86@yahoo.com. Please send

                        M S 2 Replies Last reply
                        0
                        • S Simon P Stevens

                          :laugh: :laugh: :laugh: I got an email notification and didn't notice the user name. I was all geared up to come back with a really cutting sarcastic comment. Then I noticed it was you. I have pent up sarcasm now that I need to release. God help the next person who posts a programming question in the lounge. (Or the next person in the office who asks how to add numbers together in excel) ;)

                          Simon

                          G Offline
                          G Offline
                          Giorgi Dalakishvili
                          wrote on last edited by
                          #13

                          Simon Stevens wrote:

                          I have pent up sarcasm now that I need to release. God help the next person who posts a programming question in the lounge.

                          Will it work? http://www.codeproject.com/script/Forums/View.aspx?fid=1649&msg=2819973[^]

                          Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

                          S 1 Reply Last reply
                          0
                          • C Chandrashekar Reddy 0

                            I am facing simlar problem here. If you get it, plz send me also. my email is chandu_reddy86@yahoo.com. Please send

                            M Offline
                            M Offline
                            maifs
                            wrote on last edited by
                            #14

                            hi man read first one ansers to search from googles.this is not a place of doing such questions. read that articles in my replies then you can find your anser. thry this one. System.IO.File.Copy("C:\\abc.txt", "D:\\abc.txt"); and make sure the file is exist on c drive, if not then create a text file named abc and save on c drive.

                            Maifs

                            1 Reply Last reply
                            0
                            • C Chandrashekar Reddy 0

                              I am facing simlar problem here. If you get it, plz send me also. my email is chandu_reddy86@yahoo.com. Please send

                              S Offline
                              S Offline
                              Simon P Stevens
                              wrote on last edited by
                              #15

                              Just post your bank account details and I'll email you all the codez you want as urgntz as you can take them. (I'm not joking. I'm serious. Just post them. I won't charge too much ;) ) Alternatively, you can read the responses that are already here and stop wasting everyone's time. :-D

                              Simon

                              A 1 Reply Last reply
                              0
                              • G Giorgi Dalakishvili

                                Simon Stevens wrote:

                                I have pent up sarcasm now that I need to release. God help the next person who posts a programming question in the lounge.

                                Will it work? http://www.codeproject.com/script/Forums/View.aspx?fid=1649&msg=2819973[^]

                                Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

                                S Offline
                                S Offline
                                Simon P Stevens
                                wrote on last edited by
                                #16

                                Giorgi Dalakishvili wrote:

                                Will it work?

                                Probably not. :laugh:

                                Simon

                                1 Reply Last reply
                                0
                                • S Simon P Stevens

                                  Just post your bank account details and I'll email you all the codez you want as urgntz as you can take them. (I'm not joking. I'm serious. Just post them. I won't charge too much ;) ) Alternatively, you can read the responses that are already here and stop wasting everyone's time. :-D

                                  Simon

                                  A Offline
                                  A Offline
                                  Ashfield
                                  wrote on last edited by
                                  #17

                                  Simon Stevens wrote:

                                  Alternatively, you can read the responses that are already here and stop wasting everyone's time

                                  or just try a career change :)

                                  Bob Ashfield Consultants Ltd

                                  1 Reply Last reply
                                  0
                                  • G Giorgi Dalakishvili

                                    You should have guessed that it's not he because I said 'Thanks' while he uses[^] 'thx' :-D

                                    Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

                                    G Offline
                                    G Offline
                                    Guffa
                                    wrote on last edited by
                                    #18

                                    I spotted that. A dead give-away. :) 7r01z can't write out the word "thanks" without bursting. It's like trolls and sunshine... :)

                                    Despite everything, the person most likely to be fooling you next is yourself.

                                    1 Reply Last reply
                                    0
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • World
                                    • Users
                                    • Groups