Paste the count of the files under the column

Hello!

I have removed the count of the each files from the folders and i want to paste that count in excel under the column of the folders name.

Hi @Priyesh_Shetty1

You can write it by using the expression

Directory.GetFiles(folderpath).Count.ToString

If you have a DataTable,
Loop using For each row in DataTable,
in there use an assign activity as below

CurrentRow(“FileCount”)= Directory.GetFiles(folderpath).Count.ToString

the folder path would be Directory + FolderName in your another column

Thanks

Hi @Priyesh_Shetty1

You can store the Count of column in a integer variable like Columncount.

Assign -> IntColumncount = Directory.getfiles(Folderpath).Count

Use write cell activity to write the columncount in the columns cell in excel.

Hope it helps!!

@adiijaiin


I want ouput like this… i got the count and total count of files from the folder knw only i want to paste that count and total count under each column of the folder name like above image in excel.

@adiijaiin CVLKRA CAMS NDML these all are folder names inside that there are zip files…It should dynamically create data table there is no data table available the folder names are fix but some time there will be only 2 folders like CAMS KARVY,Sometime all folders like that so what can i do?