Question4Replies71Views NandhiniT9390 Member since 2019 3 posts Ford Motor Company Posted: 6 months agoLast activity: 4 months ago Number of files in a folderHow to count the number of files in a folder ? ***Edited by Moderator Marissa to update Type form Pega Academy to Product**** Pega Robotic Process Automation 19.1 Reporting Manufacturing and High Technology Business User ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Posted: 6 months agoHarish_GCS PEGA replied to NandhiniT9390Hi Nandhini, You can make use of the File list() method in java to get the count of files in a directory. Eg:- java.io.File directoryName = new java.io.File("C:\\SYSTEM\\CUSTOM_DIRECTORY");int fileCount=directoryName.list().length; --This prop holds the countoLog.infoForced("No of files Count:-"+fileCount); This can be used in your Java Step to Let me know if that helps! Posted: 5 months agoNandhiniT9390 Ford Motor Company replied to Harish_GCShow do i use this in automation ? Posted: 4 months agojeffbadger PEGA replied to NandhiniT9390Using the FileUtils component you can execute the GetFilesInDirectory and then count the result set. Your automation would look like this. Posted: 5 months agoRonLee_GCS PEGA replied to NandhiniT9390Not sure what you mean by "in automation", can you provide more details?You can add a Java step to any activity. You can put the above code into the source for the Java step. If you can access the activity in your automation, you can get the number of files.