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. Web Development
  3. ASP.NET
  4. How to rename folder with help of asp.net

How to rename folder with help of asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelptutorial
3 Posts 3 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.
  • D Offline
    D Offline
    dj rock
    wrote on last edited by
    #1

    hi guys i am creating folder thru asp.net with help of system.io.directory.createdirectroy() now i want to rename directory name....but this doesnt have inbuilt rename method. so if any one has done it before please help me.....

    Regards, DJ Rock

    I C 2 Replies Last reply
    0
    • D dj rock

      hi guys i am creating folder thru asp.net with help of system.io.directory.createdirectroy() now i want to rename directory name....but this doesnt have inbuilt rename method. so if any one has done it before please help me.....

      Regards, DJ Rock

      I Offline
      I Offline
      iamrashida83
      wrote on last edited by
      #2

      suppose ur file is located at c:\ with name 'rashida.txt' u want to rename this file to 'rashida-1.txt' then use Directory.Move("C:\rashida.txt", "C:\rashida-1.txt"); this will rename ur file thought it'll cut ur file and paste there with different name but u can rename the file in this way

      Regards, Rashida Jabeen http://www.akaas.net[^]

      1 Reply Last reply
      0
      • D dj rock

        hi guys i am creating folder thru asp.net with help of system.io.directory.createdirectroy() now i want to rename directory name....but this doesnt have inbuilt rename method. so if any one has done it before please help me.....

        Regards, DJ Rock

        C Offline
        C Offline
        Costica U
        wrote on last edited by
        #3

        Use System.IO.Directory.Move System.IO.Directory.Move("oldFolder","newFolder")

        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