How to get Folder and its details/Propoerty (Name, Size, Contain, Last modified) in the excel sheet

Guys Need some help in getting the folder and its contents in the excel format.

Hi @smanik19,

As per my understanding you want to navigate to the particular folder and get the list of folders inside. Then for each folder, you want the details like Name, Size, modified etc., Correct me if I’m wrong.

For this, you can use

  1. Directory.Getfiles(“Path”) to get the list of folders inside a folder into an array using assign activity.
  2. Then looping through the array length and send hot key Alt + Enter to open the properties tab
  3. You can see all the required fields you need. Use get text activity to scrap the data you need.

Hope this helps

Hi @smanik19

If you want the details of files then you can use “FILEINFO” method ( for files)
Please refer How to get the system information from our file ?- FileInfo and FileInfoSystem to get more idea about it.

Regards,
Atul

Hi Harmeesh,
This is what i tried but i end up in issue with “for each” activity, as i can’t able to loop through the each line.

@smanik19,

I’m able to get the size. I don’t what you are missing… here are the screenshots of what I did… But make sure you are using dynamic selectors …

Entering the path of the folder we need in the explorer. It will open the folder that we need. So, we need to send hot key to go back and the folder will be highllighted. Then we need to send the hot ket Alt + Enter to open the properties tab.

image

After opening the properties, use anchor base to get the size …

Once you got the size, close the properties tab you opened.

image