Windows Project - Illegal characters in path. (Parameter 'path')

We are trying to convert all of our processes to Windows projects from Windows Legacy.

I have a path, what was working in Legacy project, but it doesn’t want to work in Modern.

The error is:

Illegal characters in path. (Parameter ‘path’)

The path looks like this \\collaboration.mykuka.com\xy\Org\Folder (I replaced part of the real path here, doesn’t really matter the text, as it has only letters from the English alphabet.

Does anyone has a solution for this?

@Balint1367

Dots are not allowed in the windows project in the invoke workflow if that is where you are using it

Cheers

And what can I do to overcome this? Escape character? I am using the path in File related task, like copy or For each file in folder

Provide the full path.

@Balint1367

If using relative shift to fullpath…

Path.currentdirectory will give the current execution directory

Cheers

Sorry all, the text editor here overwrites “\\” as “\”.

So I am using full path starting as “\\collaboration”

What is more interesting, another locations are working, even with . in them. Such as \\xy.zx.xx.com\folder\subfolder.

It seems it has problem straight with the above one.

1 Like

@Balint1367

So is it resolved now?

Cheers

No, for the original path still doesn’t work. For other full path it works.

@Balint1367

can you share exactly which path it is?

also can you check if there are any spaces

To check use path.Combine("Path") and see if it resolves

cheers

I would try deleting the activity and re-adding it.

I did try it in a different project and test bench as well, same result.

@Anil_G I would not like to share the exact path for safety reasons. The beginning of the path is the same, after that I replaced the name of the folders in the same manner as they are in the path.

@Balint1367

Did you try with path.combine

And in which activity it is failing?

Cheers

Hi ,

Can you use relative path instead of full path?

Hello!

Sorry for the late answer, I was on holiday. So Path.Combine didn’t help either.

Any activity what has something to do with the path: Copy, For Each File in Folder, etc.

I could get around the For Each File in Folder with Directory.GetFiles but the Copy doesn’t want to work even if I try in invoke code.

@AMAN_GUPTA

Relative path is not possible, totally different network location.

I think I will open an official UiPath ticket for this issue.

Hi, was this issue resolved? I am getting the same error when trying to convert a legacy project to windows.

Hello!

Not yet, I have an open ticket with tech support, they want to have a live session to check it together. If I find out anything useful I will bring it up here too to help others.

The new Windows activities are more sensitive than the legacy ones, that one is sure. We find also many interesting cases as we turn all our around 150 processes into the Windows version.

What is one of the most annoying one that they don’t have yet BAPI activity for Windows, just for legacy, so we have to keep those in the old framework.

Still waiting for the technical support to find an appropriate date.

Hello @Balint1367

If the issue still persists, can you please review and execute the attached .xaml file and see if there are illegal\invalid\foreign characters in the path?

Make sure to upgrade UiPath.System.Activities version to 23.10.3 or higher while using this workflow. Also, update the network path in the first assign activity before executing it. This is just for troubleshooting purpose, and it will not fix the problem, however, hopefully, it will show the hidden character.

CheckInvalidChars.xaml (12.9 KB)

Hello!

We tried everything with the support, but as it is quite a unique error, they couldn’t figure it out, what exactly causing this.

There are no real illegal characters in the path (checked with every method we could come up with). To quote: the access to the SharePoint via UNC path is very limited, because of security reasons from Microsoft.

So something in the new .net 5.0 Framework doesn’t like in this path, it works fine with legacy.

Hello @Balint1367

Indeed, If I am not wrong, there seems to be an issue with .NET core (reference). Hence, I was curious to see if the above xaml file could capture that invisible hidden characters.