# Passing picked folder course to personalized Service implementing AppleScript

I have a personalized Service I developed in Automator. Now, the solution turns up in my context (appropriate - click) food selection, when appropriate - hitting on any kind of folder. In Automator, I included the Run AppleScript activity, to execute this code:

on run {input, parameters}
do shell script "/usr/bin/find ./ -type f -name .DS_Store -delete -print"
return input
end run


My purpose is to delete all .DS_Store documents in the picked folder (and also all folders within it). I generally do this in Terminal by implementing /usr/bin/find /path-to-folder -type f -name .DS_Store -delete -print, yet I would certainly enjoy to get this to function from my personalized Service.

I'm assuming I require to pass the picked folders course to the AppleScript function (via input probably?), yet I have no suggestion just how, neither do I see any kind of activities in Automator to pass this. I'm making use of OS X 10.6.5. Any kind of suggestions or pointers?

0
2019-05-13 02:49:08
Source Share
On top of the screen, over your activity, there need to be a checklist - box that claims Service receives selected <text> in <any application>. Transforming <text> to folders need to offer you the folders as input.