The following is my input n output code, which I am inputting my file from the following path way myDocuments/AAA BB - CCC BBB - 2023 02 14.xlsx and outputting the result to the same location, but now I wanted to change the input and out by adding a sub folders in mydocuments names as ABC (mydocuments → ABC → AAA BB - CCC BBB - 2023 02 14.xlsx). how can i change my code so that i can extact and import my file from a sub folder in mydocuments.
From: string.Format(“{0}\AAA BB - CCC BBB - 2023 02 14.xlsx”, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
To: string.Format(“{0}\AAA BB - CCC BBB - “+DateTime.ParseExact(System.Text.RegularExpressions.Regex.Match(Path.GetFileNameWithoutExtension(string.Format(”{0}\AAA BB - CCC BBB - 2023 02 14.xlsx”, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))),“\d.+”).ToString,{“yyyyMMdd”,“yyyy MM dd”},System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None).AddDays(1).ToString(“yyyyMMdd”)+“.xlsx”, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))