Count files only

Discuss RoboTask here
Post Reply
Posts: 9
Joined: Sat Aug 08, 2009 7:13 pm
Location: Netherlands

Count files only

Post by KeesB »

I need to just count files in the current directory. Is there an argument to FilesCount so it doesn't count files in sub folders?
Site Admin
Posts: 3017
Joined: Thu Jan 01, 1970 1:00 am

Count files only

Post by Oleg »

You are correct, {FileCount()} variable counts the amount of files in specified folder and all subfolders.
In order to count files in specified folder only use the File Loop:

Set variable num to 0
File Loop //without subfolders
   Increment num
End Loop

Probably we need to add corresponding system functions. I wrote this into our ToDo list.
Posts: 195
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Re: Count files only

Post by Rukbunker »

Bumping up an old topic, because I still face this "problem" today ;) Ofcourse the workaround works, but it will be great if that can be fixed into a system variable.
Post Reply