Count files only

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

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?
Thanks,
 
Kees
 
Oleg
Site Admin
Posts: 3017
Joined: Thu Jan 01, 1970 1:00 am
Contact:

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.
Rukbunker
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