change a file name in vb.net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • xke

    #1

    change a file name in vb.net

    Other than copying the file under a different name and delete the
    initial file, is there any other way to change a file name in vb.net ?

    Thanks,
    xk

  • Tom Shelton

    #2
    Re: change a file name in vb.net

    On Nov 6, 9:15 am, xke <xke...@gmail.c omwrote:
    Other than copying the file under a different name and delete the
    initial file, is there any other way to change a file name in vb.net ?
    >
    Thanks,
    xk

    System.IO.File. Move (sourcePath, destinationPath )

    --
    Tom Shelton

    Comment

    • xke

      #3
      Re: change a file name in vb.net

      So simple!

      Thanks

      On Nov 6, 11:39 am, Tom Shelton <tom_shel...@co mcast.netwrote:
      On Nov 6, 9:15 am, xke <xke...@gmail.c omwrote:
      >
      Other than copying the file under a different name and delete the
      initial file, is there any other way to change a file name in vb.net ?
      >
      Thanks,
      xk
      >
      System.IO.File. Move (sourcePath, destinationPath )
      >
      --
      Tom Shelton

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: change a file name in vb.net

        "xke" <xkeops@gmail.c omschrieb:
        Other than copying the file under a different name and delete the
        initial file, is there any other way to change a file name in vb.net ?
        In addition to the other reply: You can use VB's 'Rename' function or
        'My.Computer.Fi leSystem.Rename File'.

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

        Comment

        Working...