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