Filepath with dynamic elements

Hi, I am trying to make a dynamic filepath as the activity requires me to use the full filepath regardless of it being within an excel application scope. I am having difficulty crafting the path as the last backslash “” is causing the code to turn into mush. Any advise is appreciated :slight_smile:

@lmoham - Is this C# or VB??

For starters can you give Path.Combine a try? Maybe you can simplify the expression to come up with the dynamic path.

The other option is to try String.Format.

For example:

String.Format("{0}{1}{2}", BaseFolderPath, subFolderNm, nonMushyFileNm)

In this case you resolve the 3 variables separately in less complicated code and then use the above expression to build the dynamic file path.

Hi its in C#

@lmoham - Please check this…just add @ symbol before the folder path…orelse c# treat as a escape sequence and throw an error…

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.