Counting files in folders fails
Counting files in folders fails
- Subject: Counting files in folders fails
- From: Christopher Warr <email@hidden>
- Date: Wed, 06 Dec 2000 07:36:43 -0500
I have a script that searches nested folders for specific file type and
creators then performs a series of actions based on the type.
The first part of the script when I get a count of my files works fine for
all of the "type and "creator" lines but gives incorrect counts when I tell
it to count all files. I plan to use the "all_files_count" to generate a
dialog box if there are files in the nested folders that were not processed
by the script.
set the hdrfile_list to (every file of the entire contents of the
chosen_folder whose file type is "TIFF" and creator type is "SCam") as list
set the tiffile_list to (every file of the entire contents of the
chosen_folder whose file type is "TIFF" and creator type is "8BIM") as list
set the psdfile_list to (every file of the entire contents of the
chosen_folder whose file type is "8BPS" and creator type is "8BIM") as list
set the psd2file_list to (every file of the entire contents of the
chosen_folder whose file type is "8BIM" and creator type is "8BIM") as list
set the ctfile_list to (every file of the entire contents of the
chosen_folder whose file type is "..CT" and creator type is "8BIM") as list
set the epsfile_list to (every file of the entire contents of the
chosen_folder whose file type is "EPSF" and creator type is "8BIM") as list
set the xlsfile_list to (every file of the entire contents of the
chosen_folder whose file type is "XLS8" and creator type is "XCEL") as list
set the textfile_list to (every file of the entire contents of the
chosen_folder whose file type is "TEXT" and creator type is "XCEL") as list
set the sampfile_list to (every file of the entire contents of the
chosen_folder whose file type is "EPSF" and creator type is "SAMP") as list
set the folder_list to (every folder of the entire contents of the
chosen_folder) as list
set the file_list to (every file of the entire contents of the
chosen_folder) as list
set hdr_count to count of hdrfile_list --counts the HDR files processed
in all folders
set tif_count to count of tiffile_list --counts the tiff files processed
in all folders
set psd_count to count of psdfile_list --counts the photoshop files
processed in all folders
set eps_count to count of epsfile_list --counts the EPS files processed
in all folders
set xls_count to count of xlsfile_list --counts the excel data files
files processed in all folders
set samp_count to count of sampfile_list --counts the color central FPO
files processed in all folders
set text_count to count of textfile_list --counts the excel text files
for database entry files processed in all folders
set ct_count to count of ctfile_list --counts the Scitex CT format files
processed in all folders
set folder_count to (count of folder_list) + 1 --returns a count of the
folders processed plus one for the parent folder
set all_file_count to count of file_list --returns a count of every file
in all of hte folders used to check for rejected files
set rejected_file_count to (all_file_count - hdr_count - tif_count -
psd_count - eps_count - xls_count - samp_count - text_count - ct_count)
--does the math to see if there are any files that need to be manually
checked
--
Christopher Warr
Young Phillips Pro-Photo
6399 Amp Drive
Clemmons NC 27012
336-766-7070 xt.251
208-730-1673 fax
email@hidden
email@hidden
http://www.youngphillips.com