Darren D
darren at activebilling.com.au
Thu Jun 26 19:06:43 CDT 2008
Hi team Does anyone have an example of counting how many files there are of a particular type in a folder? EG I want to count all the PDF, TXT and XML files in 3 corresponding folders EG the folders are named for the file type they hold Folder 1 = \\OurServer\OurClient\Files\XML\*.xml Folder 2 = \\OurServer\OurClient\Files\PDF\*.pdf Folder 3 = \\OurServer\OurClient\Files\TXT\*.txt The Air code I have is See how many file types there are for client X (In the Example above there are 3 but it may be 2 or 1 even 4) So in the example above using 3 file types Start a loop for file types and count the number of files in that folder type Loop 1 = xml See how many files are in folder .\XML Report the file count move to next file type Loop 2 will = pdf See how many files are in folder .\PDF Report the file count move to next file type Loop 3 will = txt See how many files are in folder .\txt Report the file count move to next file type Then exit the loop Many thanks in advance Darren