I want to move every single .pdf file inside a folder an its subfolders to another folder. I'm trying to do this with AppleScript, but an error is returned:
tell application "Finder"
set theFolder to path to downloads folder from user domain
set destFolder to choose folder
repeat with currentFolder in (every folder of theFolder)
move (every item of (currentFolder) that name extension is "pdf") to destFolder
end repeat
end tell
Does anyone know how to solve it?
Also, is there any way to do the same with shell script?