I have written a SHELL SCRIPT which will count the number of these files coming in the directory (say in minutes).
#!/bin/bash
LOCATION="D:/Dir1/*"
FILECOUNT=0
while true
do
for item in $LOCATION
do
if [ -f $item ]
then
FILECOUNT=$[$FILECOUNT+1]
fi
done
echo "No of files are $FILECOUNT"
FILECOUNT=0
sleep 30s
done
The requirement is these files gets automatically deleted in few seconds. So we have to count only the distinct no of files. Also, we are not sure for how many sec these files remain in the directory.
please provide what changes should I do in the above code.