The given path's format is not supported

I’m using Create File activity but at run time it’s throwing error: “The given path’s format is not supported.”
How to fix this

2 Likes

Can i see the path and name that you have given buddy…it would useful to get this resolved

Cheers

1 Like

Here is the Path : "C:\Users\Bheem Sen\Documents\UiPath\Outlook\Mails"
and file name: mail.Subject+".docx".ToString

for file name I’m using variable

Buddy in file path its perfect

while in file name mail.Subject
with dot inbetween becomes an extension or a format
moreover you added + “.docx”
So file name would be mail.Subject.docx, its wrong know buddy

instead mention by saving the mail.subject to a variable if you are trying to get subject of the mail from mail message and assign the file name here like
mail_subject+".docx"

Hope this would help you buddy

Cheers

2 Likes

Actually mail.subject is used for a single mail’s subject as I’m trying to retrieve outlook mail content so i used for each loop

1 Like

no worries buddy @Sameer_Sen

you can assign the mail.subject value to a variable assigned like mail_sub_var
and assign that with file name like

mail_sub_var.ToString.Trim + “.docx”

The main thing is we cannot have two dots in a file name right,as it was mentioned like mail.subject.docx it wont take it as a file buddy

Cheers

@Sameer_Sen You need to add a slash () to your path.

"C:\Users\Bheem Sen\Documents\UiPath\Outlook\Mails\" + mail.Subject + ".docx"

And please note, there are some restrictions in naming files. Mail Subjects can have characters that are not supported for a file name. Refer the link below for naming conventions. You need to remove invalid characters from mail subject before using it as your file name.

1 Like

Buddy is that working

Cheers

No it’s not working

@Sameer_Sen
No worries buddy can i see the changed filename and file path and if possible the xaml flow as a screenshot as welL

or buddy can i see the subject, even a sample of yours…
The reason is may be the subject might contain other characters and it should be avoided
So my kind suggestion would be try to save it with mail sender name or receiveddate instead of subject buddy @Sameer_Sen

This is almost done buddy…lets sort this out
Cheers

Did that work buddy…
@Sameer_Sen

Cheers

@Palaniyappan No… it’s not working.
I can send you xaml for reference

yes buddy, That would be fine

Cheers

Dear @Palaniyappan Here is Outlook.xaml (7.9 KB)

Here is your xaml buddy, its resolved i hope
Outlook.xaml (10.4 KB)

Cheers…

1 Like

Hi Sameer,
Below are few key points to recheck-

  1. Before calling the create file activity, use Path exists activity and check whether the path you are specifying to create the file exists.
  2. Check whether you have sufficient permissions on that folder to create a file.
  3. What is the subject you are getting from email? Check whether subject has any special character that is blocking the save.
2 Likes

It worked. Thanks!!

1 Like

Thats amazing buddy @Sameer_Sen

Kindly close this thread with the comment marked as solution that could help others looking for ideas under your topic

Cheers buddy
keep going

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