How to extract Photo numbers into Notepad or Excel?

Hi Community,

I want to extract Photo Numbers from a folder. So, I tried to use Data Scraping but I’m getting below error as shown.

image

Could you please explain which activities to use in order to extract all the id’s of photos.

Example: If the photo names are ABC_123, ABC_719, ABC_253, etc., I need to extract all the names of all the photos from a folder into a Notepad or Excel.

Thanks in Advance:-)

Hi,

Do you mean to want to extract file names from a specific folder? If so the following will work.

filenames = System.IO.Directory.GetFiles("yourFolderName")

note: filenames is String Array type.

Regards,

Hello,

I tried and i’m getting result as shown below
image

Hi,

As filenames is String Array type, can you try as the following?

note: TypeArgument of ForEach is String

OR

String.Join(vbCrLf,filenames)

Regards,

Hello,

It’s working . But how can i get only the file name instead of full Path ?
Also how to add those files name in NotePad?

Hi,

Can you try GetFileNameWithoutExtension method and AppendLine activity as the following?

Regards,

1 Like

Thank you so much. Issue resolved now. I’m able to fetch all the file names. :slight_smile:

1 Like

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