SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
File count

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
File count
Author Message
Gad



Joined: 09 Jan 2006
Posts: 2

Post File count Reply with quote

Hi,
Is there an easy way to evluate number of files in a directory (file count).

Thanks
Gad

Mon Jan 09, 2006 2:22 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: File count Reply with quote

In a VBSCript job you can use File collection to get the count; in a JAL script job you can use Dir and then loop and count number of returned entities; in a batch job you can use DOS "dir" command and then process the output using our LineCopy utility to get the last line of the output containing file count.

Here is an example for VBScript:

Dim fso, f, fc
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder("c:\myfolder")
Set fc = f.Files
MsgBox CStr(fc.Count)

: Hi,
: Is there an easy way to evluate number of files in a directory (file count).

: Thanks
: Gad

Mon Jan 09, 2006 6:35 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.