Changing PDF default application and moving

I have a folder with hundreds of PDFs. How would you have a script run through the contents of them and change the default application that they open with (Acrobat) to Preview and then move each one to another folder? Is this possible? Is it also possible to have the folder “watch” and see when new Files are added and then change the default application and move them?


You should be able to globally change the default app by getting info on a PDF file (Command-I). Towards the middle of the panel there is an option that says “Open with”. Select “Prview” from the menu and press the button marked “Change All”. Then just OK the next dialog and you should be in business. Note: Acrobat will squawk about not being the default app when you open a pdf by dragging it to the app icon but it does give you the option of not showing the dialog again (I couldn’t find it in the Preferences.)

As for moving items and watched folders there a a lot of scripts (and help) here as well as folder actions on your machine.

Best Regards,
Jim Neumann

You don’t say if they all have to be moved to the same folder. If they do, a simple folder action would be as follows. (I’m assuming you know how to set up folder actions.)

on adding folder items to thisFolder after receiving addedItems
	tell application "Finder"
		set pdfFiles to a reference to (every file of folder thisFolder whose name extension is "pdf")
		if (pdfFiles exists) then
			tell pdfFiles to set {creator type, file type} to {missing value, missing value}
			move pdfFiles to folder "untitled folder" of desktop -- Your other folder here.
			display dialog "No .PDF files in this folder."
		end if
	end tell
end adding folder items to