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. file rename application

file rename application

Scheduled Pinned Locked Moved C#
helpsysadmin
1 Posts 1 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.
  • S Offline
    S Offline
    Sunil Wise
    wrote on last edited by
    #1

    yesterday Mr.John sir has helped me in one issue which is related to the same task code--- else if (txtHospitalName.Text== "Medb" || txtHospitalName.Text== "Medw") { FileInfo thefile1 = new FileInfo(Server.MapPath("RtfFilesPath") + "\\voice\\" + txtOriginalName.Text.Trim() + ".wav"); if (thefile1.Exists) { File.Copy(Server.MapPath("RtfFilesPath") + "\\voice\\" + txtOriginalName.Text.Trim() + ".wav", Server.MapPath("RtfFilesPath") + "\\voice\\" + txtFilename.Text.Trim() + thefile1.Extension); GetData(); } hello frns the above is the snippet of code i used in my application what i am doing is copying a file and saving it with the someother name its working fine, but the actual problem is i'll be having two types of files in my folder one is .mp3 and .wav . so in the above code i am checking only the .wav file note: i'll be entering only the name of the file without extension, there may be any one of the two filetypes. what are the modifications/additions i have to make in my code to check for two types of file extensions thanks for ur replies in advance

    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