"The given path's format is not supported"

Hi,

Help needed! I encountered this error when trying to create folder.

“The given path’s format is not supported”.

I am using variables in Create Directory activity and my variable type is “String”.
PathParentFolder.ToString+"/"+SubFolderName

Thanks.

Hi @Cheang … Could you please try this…

PathParentFolder.ToString+"\"+SubFolderName

Hi @prasath17
Thanks, tried with \ but it’s still having the same error.

Hi,

I recommend to use System.IO.Path.Combine method as the following.

System.IO.Path.Combine(PathParentFolder.ToString,SubFolderName)

It will reduce trouble of path separator.

Regards,

1 Like

thanks… but it doesn’t work as well. I still getting the same error message.

Hi @Cheang

Could you show what the value inside pathparentFolder and sunFolder… thanks

@Cheang

Place a log message activity and pass the PathParentFolder.ToString+""+SubFolderName and check, so this may help you to track the error

Thanks

my PathParentFolder is

https://teamsite2019.orgnet.sg/sites/pcm/Shared%20Documents/2.%20Secondary/Audits/GGGG/2020/testrpa

and my SubFolder is “Direct buy”

It’s actually from a read range of an excel file.
So what I’ve done is using Get Row Item for PathParentFolder and SubFolder from the datatable (excel) and create the SubFolder in the PathParentFolder.

Currently my uipath studio is unable to install “Sharepoint package”. Was wondering if this is causing the error.

@Cheang

Read Range activity works if it is a local file

For sharepoint related things you have to either install the package / you download it locally and upload again

Hope this may help you

Thanks