Need help how to extract the name of file

“Required infoRequired infoABC_Summary (1).pdf 2022-02-28✱9 minutes agorpa–BworkerCA (CA)9 minutes agorpa-BworkerCA (CA)”

I would like to get the pdf file name=ABC_Summary (1).pdf
The extracted get value is done from a sharepoint site.
Could anyone help me how to extract pdf file name from here?

1 Like

Hi @debosree

can you elaborate your process??

how you are extract this sharepoint data??

In the ‘Documents’ section of sharepoint, I’m trying to upload a file ABC_Summary.pdf.But, if the file already exists , the one that is recently uploaded is changed to ABC_Summary (1).pdf.
Now, I need to do further processing using the latest file (ABC_Summary (1).pdf) .Hence, I need to know the latest file name( eg-ABC_Summary (1).pdf or ABC_Summary (2).pdf etc).

I am able to get the latest file name using ‘Modified time’(sorting newer to older) and extracted the 1st row using rowindx in sharepoint. Now , I need to extract the name from that row.The special char is coming if earlier col1, col2 in that row don’t have values.

Hi @debosree

Can you share your extracted as a text file

If this is stored in a string variable named Strinput

Then use a assign activity like this to get the Filename with file extension

stroutput = System.Text.RegularExpressions.Regex.Match(Strinput.ToString, “(?<=\W)[a-zA-Z].+.(.pdf)”).ToString

Cheers @debosree

1 Like

Thank you so much.

1 Like

Glad it got resolved

@debosree

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