Posts Tagged ‘.net code’

Request Object of ASP .NET related to Paths

Request Object Here’s a list of the Path related properties on the Request object (and the Page object). Assume a path like http://www.avmendapara.com/wallpaper/admin/paths.aspx for the paths below where webstore is the name of the virtual. here property of request object given ApplicationPath : Returns the web root-relative logical path to the virtual root of this [...]

Rename your all files located in one folder

rename files just use this code its rename all files which is located in your folder path string dest; string[] a = new string[5]; string b = Server.MapPath(“your folder path”); a = Directory.GetFiles(b); for (int i = 0; i < a.Length; i++) { FileInfo sos = new FileInfo(a[i].ToString()); //string c = a[i].ToString(); //source = a[i].ToString(); [...]

Renaming In .net With C#

Renaming Your files using c# just copy and paste your code. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace rhozetApplication3 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private int File_Delete(string Filepath) { FileInfo fi = new FileInfo(Filepath); if (fi.Exists) { [...]