I have to suffix like _1 and _7 for single file
Input
Output:
Thanks
Shaik Muktharvalli
Hope the below steps would help you resolve this
arr_files = Directory.GetFiles(“your folderpath”)
Where arr_files is a variable of type array of string
Now use a FOR EACH activity where pass the above array variable as input and change the type argument as string
Inside the loop use a COPY FILE activity where pass the source as item.ToString
And destination mention as Path
“your folderpath” +”\“+System.IO.Path.GetFileNameWithoutExtension(item.ToString)+”_1”+System.IO.Path.GetExtension(item.ToString)
And another copy file activity like this within the same loop
“your folderpath” +”\“+System.IO.Path.GetFileNameWithoutExtension(item.ToString)+”_7”+System.IO.Path.GetExtension(item.ToString)
https://docs.uipath.com/activities/other/latest/workflow/copy-file
Hope this helps
Cheers @shaik.muktharvalli1
Hi @shaik.muktharvalli1 ,
Could you maybe check with the below Configuration, Essentially I believe we would require to use Two Copy File activity for the same file to rename with _1 and _7 :
Expression used in Copy File :
Path.Combine(CurrentFile.DirectoryName,Path.GetFileNameWithoutExtension(CurrentFile.FullName)+"_1"+CurrentFile.Extension)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.