c# - File.Move Not Working, No Error -
i'm running issues trying move flat html files around on server. in short, process says should take whatever file in newpath (if there one) , move backup folder. take file in old path , move new path. checks see if successful (i.e. newpath exist) , if wasn't, replaces backup. i've pasted method below viewing pleasure. public bool movecontent(string oldpath, string newpath, string backupdirectorypath, out string backuppath) { backuppath = string.empty; var oldfilepath = httpcontext.current.server.mappath(oldpath); var newfilepath = httpcontext.current.server.mappath(newpath); var newdirectory = path.getdirectoryname(newfilepath); // if file we're moving doesn't exist, fail. if (!file.exists(oldfilepath)) throw new invalidpathexception(oldfilepath); // if no destination found, fail. if (string.isnullorwhitespace(newdirectory)) throw new invalidpathexception(newfil