Guys Need some help in getting the folder and its contents in the excel format.
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
- Directory.Getfiles(“Path”) to get the list of folders inside a folder into an array using assign activity.
- Then looping through the array length and send hot key Alt + Enter to open the properties tab
- You can see all the required fields you need. Use get text activity to scrap the data you need.
Hope this helps
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.
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.
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.
After opening the properties, use anchor base to get the size …
Once you got the size, close the properties tab you opened.