private String GetCurrentFilePath(Control ctl) { return ctl.Text.Substring(0, ctl.Text.LastIndexOf("\\") + 1); }