cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with dynamically created file path - identical to the 'correct' path but not working

PeterHeyburn123
Level 3

Hi all,

I am developing a process where I need to access a folder, 'Folder1' contained within a network drive. Within this folder, there are subfolders by year and then month. I need to be able to access files within the correct folder depending on the current year and month.

However I have found that the dynamic file path I am generating does not work despite being identical to the actual file path I would use if I were to hardcode it.

I am using a config file with the following example file path structure:

L:\Folder1\<YEAR>\<MONTH>\Filename.xlsm

During the process I am using a multi-calculation stage to replace the two text placeholders using FormatDate(Now(), "yyyy") and FormatDate(Now(), "MM. MMMM") to generate e.g. 2024 and 06. June respectively, so the file path becomes:

L:\Folder1\2024\06. June\Filename.xlsm

For some reason the above generated file path does not work despite being identical to the file path retrieved from the Security tab of the properties window for the file. I am at a loss and hoping to get some help!

I have checked for leading/trailing spaces, used Trim() to eliminate these. I have pasted both the generated path and the actual path into a notepad document and compared them character by character. My working theory is that Blue Prism has somehow introduced some kind of special character into the string.

This method is working in other processes with identical logic but not this one. I am posting from mobile so apologies for any formatting issues. Thanks in advance.

12 REPLIES 12

Hi Devneet,

Your answer revealed the cause of the issue, the solution was to delete the column in the config excel file and recreate it. Thanks for your help, you have saved me a lot of heartache!

@PeterHeyburn123 - Really glad that both and @GeoffHirst could help you resolve the issue! Most of the time, I have also seen in past Excel usually gives these odd behaviors good thing you have this file in your control so not much of an issue to reformat it but I have seen this behavior with some of my Spanish client files that used to come from an ERP system like SAP Concur where many times these UNICODE characters mess up the structure and it's a nightmare for us to handle this.

Hope to see you in community forum soon and wish you have an amazing time ahead with your project!

---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Nice one chaps, I am pleased we have a solution here. Nice one Devneet, well done sir.

regards

 

Geoff Hirst Senior DX Engineer - Digital Exchange - EMEA SS&C Blue Prism