Help me to solve

help me to solve this error…coupon_move_array is declared as string array

can you try this

"C:\users\pc\desktop\"+"uipath"+Datetime.today.tostring("yyyy-MM-dd")+"\"+"coupon"+"coupon"+now.ToString("dd-MM-yyyy")+Path.GetExtension(coupon_move_array(0))

Hi,

I guess you define variable named “path” as string.

Can you try to add System.IO. before Path.GetExtension like System.IO.Path.GetExtension?
Or
Can you rename your variable “path” to other name?

Regards,

Hi @mu_nazza,

It looks to me like you have an additional quotation mark somewhere, or one of your quotation marks isn’t a proper quotation mark.

Try copying the path that @jack.chan has supplied:

maybe you are working on C# (also close a statement with ; in the C# case)
then the " - intentation was the path construction is triggering an escaping of " (we do see the confused red color text parts)

Maybe better to work with Path combine or add an @ before the string like:

@“ABC” + myVar + “” + othervar

1 Like