Hi there,
I am writing the scripts to get subfolders files to send for printing.
Inside my codes, I write the codes to allocate half of the subfolders files
to Printer One and the other half of subfolders files are allocated to
Printer Two.
I am using the subfolders.count property and this given me the total
number of subfolders that I have in the parent folder. I am able to do for
the first half and now I would like to know which is the folder that I
should start from to send for Printer Two.
For instance, total count of the subfolders have 10, therefore I will send
files from subfolder 1 till 5 to Printer 1. And, starts from subfolders no.6
till 10 will send to Printer 2. Now I am stucking at how to continue for
Printer 2. I am wondering whether I can use Item(i) sth like....
cnt = objFolders.Subfolders.Count
i = 1
If cnt <> 0 Then
For Each foldername in objFolders.Subfolders
Set objSubfolders = objFs.Getfolder(foldername.path)
Set objFiles = objSubfolders.Files
'Sends to Printer 1.
For Each filename In objFiles
objFs.CopyFile objSubfolders & "\" & filename.name,
"\\server\Printer1"
Next
If i = Round(objFolders.Subfolders.Count/2,0) Then
Exit For
End If
i = i + 1
Next
End If
I need some advice here, please help. Thanks.