Question4Replies97Views×Close popoverNandhini Thirumaran (NandhiniT9390) Ford Motor Company Ford Motor Company IN View ProfileSend Message NandhiniT9390 Member since 2019 3 posts Ford Motor Company Posted: April 20, 2020Last activity: June 15, 2020Posted: 20 Apr 2020 15:06 EDTLast activity: 15 Jun 2020 13:12 EDT 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: 10 months agoPosted: 20 Apr 2020 15:40 EDT×Close popoverHarish Gunneri (Harish_GCS) PEGA Senior Software Solutions Engineer Pegasystems Inc. US View ProfileSend MessageHarish_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: 10 months agoPosted: 20 Apr 2020 23:36 EDT×Close popoverNandhini Thirumaran (NandhiniT9390) Ford Motor Company Ford Motor Company IN View ProfileSend MessageNandhiniT9390 Ford Motor Company replied to Harish_GCShow do i use this in automation ? Posted: 8 months agoPosted: 15 Jun 2020 13:12 EDT×Close popoverJeff Badger (jeffbadger) PEGA Product Manager, Robotics Pegasystems Inc. US View ProfileSend Messagejeffbadger 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: 10 months agoPosted: 24 Apr 2020 14:22 EDT×Close popoverRon Lee (RonLee_GCS) PEGA Principal Software Solutions Engineer Pegasystems Inc. US View ProfileSend MessageRonLee_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.