Str_xNetworkPath : “C\User\Test\X”
I am using Invoke method for renaming the file(.xlsx) for that I am giving hard coded value as old_file name : str_xNetworkPath +“"+ Now.ToString(“yyyy”)+” “+“Bank of BAD”+”"+Now.ToString(“MM-yyyy”)+“"+“BAD_CORP_”+Now.ToString(“MM-dd-yy”)+” “+“v2”+”.xlsx" but due to “v2” value is changing many times so need to make it dynamic so that code will not give issue if the file name changes to “v1”
Also renaming 2nd another file old file name as : str_xNetworkPath +“"+ Now.ToString(“yyyy”)+”"+Now.ToString(“MM-yyyy”)+“"+“NONBAD_CORP_”+Now.ToString(“MM-dd-yy”)+” “+“v2”+”.xlsx"
from the same location str_xNetwork path if am putting in for each loop its throwing error when coming on 2 iteration ,
Any help would be appreciated here .
Thanks in advance !!