void FileRename(FileName name) { try { //move here if (textBoxInputDir.Text == textBoxOutput.Text) { File.Move(name.FullPath(), name.FullPathModified()); } //copy if directories are different else { File.Copy(name.FullPath(), name.FullPathModified(textBoxOutput.Text)); } } catch (Exception ex) { errorList.Add(new string[] { name.Modified, ex.Message }); } }