cut and paste

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PriyadarshRa01
    New Member
    • Mar 2014
    • 6

    cut and paste

    I guys



    I am a beginner for Vb.net I need to cut a file from selected location (c:\ranil\test. txt) and shold be past it another location(c:\bac kup\test.txt) and this should be happen when click command button.I use visual studio 2008

    thanks
  • JobPencil
    New Member
    • Mar 2014
    • 1

    #2
    Try This Link it may help you
    dreamincode.net/forums/topic/46964-how-to-copypaste-files/

    Comment

    • PriyadarshRa01
      New Member
      • Mar 2014
      • 6

      #3
      thanks for your quick reply but I cant see anything trough your link

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        There is a File.Move Method.

        If you need to copy the file to several locations, use the File.Copy Method to copy it to all the desired locations and then the File.Delete Method

        -Frinny

        Comment

        • PriyadarshRa01
          New Member
          • Mar 2014
          • 6

          #5
          cut and past

          I tried to write cuy and past but I cant find file system object

          [IMGNOTHUMB]http://bytes.com/attachments/attachment/7542d1395208484/aaa.jpg[/IMGNOTHUMB]
          Attached Files
          Last edited by Frinavale; Mar 19 '14, 03:50 PM. Reason: Fixed the image to properly reference the file uploaded instead of the local path of the machine the file was uploaded from.

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            Oh it is under the System.IO namespace.
            So either add Import System.IO at the top of the .vb file you are working in or specify the namespace inline like this: System.IO.File. Move(...)

            -Frinny

            Comment

            Working...