if you wanted to test the logic as a user runnable script you'ld need to ditch the event driven element that looks for pdf files being added to a folder before the script runs (ie you cant just type it into apple script editor and run it directly using the applescript editor run button)
something like this would run within applescript editor
Code:
set sourceFolder to "Macintosh HD:private:var:spool:pdfwriter:bigben11:print:To Be Printed:" as alias
set destFolder to "Macintosh HD:Users:bigben11:Documents:Windows:To Be Printed:Kyocera_FS-720_KX:"
tell application "Finder"
set thePDFs to files of sourceFolder whose name extension is "pdf"
move thePDFs to destFolder
end tell
that'll move any pdfs already in the source folder over to your destination any time you run it but isn't exactly the same script as you'ld use for the event driven folder action
even with the event driven code added back in, the script saved and moved to appropriate place, attached as a folder action to a folder etc I dont think your take on it would work for following reasons
Code:
on adding folder items to "private:var:spool:pdfwriter:bigben11:print:To Be Printed" after receiving added_items
1 when your creating the script for use as a folder action use
this_folder to define the source,
don't put the explicit source path in there
Code:
set destFolder to "Users:bigben11:Documents:Windows:To Be Printed:Kyocera_FS-720_KX"
2 explicit path
is what you need for destination, but you've not included the volume in the destination path (
Macintosh HD: or whatever you're drive is called)
Code:
tell application "Finder"
set thePDFs to files of "private:var:spool:pdfwriter:bigben11:Print:To Be Printed" whose name extension is "pdf"
3 again the source needs to be implied using
this_folder rather than the explicit path
I'd go with following as the script (note it it assumes your drive is called Macintosh HD, so edit that if neccessary)
Code:
on adding folder items to [B]this_folder[/B] after receiving added_items
set destFolder to "[B]Macintosh HD:[/B]Users:bigben11:Documents:Windows:To Be Printed:Kyocera_FS-720_KX:"
tell application "Finder"
set thePDFs to files of [B]this_folder[/B] whose name extension is "pdf"
move thePDFs to destFolder
end tell
end adding folder items to
bang that into apple script editor and do following
1 save the script to your desktop as MovePDFs
2 stick a copy of it into Library:Scripts:Folder Action Scripts
3 find your To Be Printed folder in finder, right click on it and choose Folder Actions Setup
4 in the dialog box that appears choose the MovePDFs script from the list and click Attach
5 make sure the Enable Folder Actions check box is ticked
6 print a pdf