Just for ref here is my script for doing the counting with the
countfiles.exe

C:\countfiles.exe  ini=c:\countfiles.ini section=xml

[xml]
Path=c:\test\
Pattern=*.*
Directory=F
                <- blank line

I have not added the user name and info as the local user has rights on
this folder

I keep getting 99 back

Any ideas



-----Original Message-----
From: Simon Tottingham 
Sent: Friday, 27 June 2003 11:40 AM
To: [EMAIL PROTECTED]
Subject: [SA-list] The old question of counting files in a directory


I have seen there have been quite a few emails in the past about using
the Countfiles.exe it looks like quite a few people had problems setting
this up (I am still reading up on how to set it up as I had problems).
What my question was has any one used any thing else to monitor a folder
eg a batch file or perl script,com application. I wrote a quick batch
file to do a listing of a folder I was just wondering if any one else
had written any thing else like for checking a folder.



@Echo off
If not exist %1.\Nul GoTo ERROR 

Dir %1 /A:-D-H /B | Find /C /V "?"> %Temp%.\%0.tmp
For /F "tokens=1" %%I in (%temp%.\%0.tmp) Do Set NoFiles=%%I

Echo %NoFiles%
pause
GoTo EXIT 

:ERROR
Echo.
Echo Folder %1 missing or not found
GoTo EXIT 

:EXIT
If exist %temp%.\%0.tmp Del %temp%.\%0.tmp 
To unsubscribe from a list, send a mail message to [EMAIL PROTECTED]
With the following in the body of the message:
   unsubscribe SAlive
To unsubscribe from a list, send a mail message to [EMAIL PROTECTED]
With the following in the body of the message:
   unsubscribe SAlive

Reply via email to