I have folder with excel files:
Each month folder will be update and name of excel file will be updated too.
I need to open excel file that starts from word ‘Total’, only word ‘Total’ in the name of excel file will be unchangebale, other parts will be changed.
Which activites should I use to open excel file where name starts from word ‘Total’ and copy sheet content into another excel file?
I need to scan each file name and find the file that starts with ‘Total’
How to do it?
If System.IO.Directory.GetFiles("C:\Temp\","Total*").Count > 0 Then
str_FilenPath = System.IO.Directory.GetFiles("C:\Temp\","Total*")(0)
Path to the folder is stored like this: “Path.Combine(YourPath,LastMonth)”
Following your suggestion I wrote: System.IO.Directory.GetFiles(“Path.Combine(YourPath,LastMonth)”,“Total*”)(0)
but it gets error: Could not find a part of the path
Can you please my command?
in your case it should be like:
Path.Combine should not be in double quotes
It worked! Thank you!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.